From 6125a3b9fc191e32c78d9fae405f5c6b4e980f7f Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Mon, 20 Apr 2026 21:01:07 +0200 Subject: [PATCH] add barebones results bar chart --- charts/single_result.r | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 charts/single_result.r diff --git a/charts/single_result.r b/charts/single_result.r new file mode 100644 index 0000000..3f15441 --- /dev/null +++ b/charts/single_result.r @@ -0,0 +1,22 @@ +library(ggplot2) + +# Usage: Rscript single_result.r exp_abspath + +args <- commandArgs(trailingOnly = TRUE) +experiment <- args[1] +datafile <- paste(experiment, "/resultsdata.csv", sep = "") + +if (!file.exists(datafile)) { + print(paste("Input file", datafile, "is missing")) + stop() +} + +data <- readr::read_csv(datafile) + +plot <- ggplot(data, aes(x = benchmark, y = faults, fill = resulttype)) + + geom_col(position = "dodge") + + scale_y_log10() + + labs(x = "Benchmark", y = "Faults", fill = "Result Type") + + theme_minimal() + +ggsave(paste(experiment, "/single_result.svg", sep = ""), plot = plot)