From bbac091b13807938f31c9b1d7ddf661570457a22 Mon Sep 17 00:00:00 2001 From: Mia Croiset <mia.croiset@ens-lyon.fr> Date: Thu, 20 Jun 2024 10:08:57 +0200 Subject: [PATCH] plot per condition, process in x time in y --- benchmark/plots.r | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/benchmark/plots.r b/benchmark/plots.r index 13dd0f2..1b9d59f 100644 --- a/benchmark/plots.r +++ b/benchmark/plots.r @@ -54,11 +54,42 @@ df$duration_minutes <- as.numeric(df$duration_minutes) val <- df %>% group_by(name) %>% summarise(moy = mean(duration_minutes), ect = sd(duration_minutes)) -ggplot(df, aes(x=name, y=duration_minutes))+ - geom_violin()+ - ylim(0,500)+ - facet_wrap(~ name, ncol = 8) +workflow <- character(0) +for (x in df$file) { + full <- sapply(strsplit(x, split = "/"), "[", 2) + w <- sapply(strsplit(full, split = "_"), "[", 1) + workflow <- append(workflow,w) +} +df$workflow <- workflow + +processes <- character(0) +for (x in df$name) { + process <- lapply(strsplit(x, split = ":"), tail, n = 1L) + processes <- append(processes, as.character(process)) +} +df$name <- processes + +filenames <- character(0) +for (x in df$file) { + file_short_name <- sapply(strsplit(x, split = "/"), "[", 2) + filenames <- append(filenames,file_short_name) +} +df$file <- filenames + + + + +# ggplot(df, aes(x=name, y=duration_minutes))+ +# geom_violin()+ +# ylim(0,500)+ +# facet_wrap(~ name, ncol = 8) + +important_processes <- c(15, 16, 17, 18, 7, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,9,1,2,5,6,1,1,1,1,1,1,11,1,1,1,1,12,1,1,1,1,1) +ggplot(df, aes(x = name, y = duration_minutes))+ + geom_point(aes(color = name, shape = name))+ + scale_shape_manual(values = important_processes)+ + facet_wrap(~ file, ncol = 8) # for (x in df$duration_minutes) { # print(class(x)) -- GitLab