From 8d9467cc6a465c9c788fd7eed3bf1d65524d63be Mon Sep 17 00:00:00 2001 From: lharr Date: Mon, 10 Jul 2017 21:10:06 -0400 Subject: [PATCH] Updating for capitalization (#32) --- Scripts/gea_paper_figures.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Scripts/gea_paper_figures.R b/Scripts/gea_paper_figures.R index a320068..5c93827 100644 --- a/Scripts/gea_paper_figures.R +++ b/Scripts/gea_paper_figures.R @@ -32,6 +32,8 @@ iterations_df <- iterations_df %>% iterations_df <- iterations_df %>% dplyr::mutate(fnr = (false_negative / (true_positive + false_negative))) +method_names <- c("CtrAll", "CtrM", "Fastgreedy", "Infomap", "Multilevel", "Walktrap") + plot_f1 <- function(m, a_min, a_max, iterations_df){ # m = number of paths # a_min = min percent additional @@ -48,7 +50,7 @@ plot_f1 <- function(m, a_min, a_max, iterations_df){ facet_grid(percent_addit ~ percent_path) + ylab("F1 Score") + theme(axis.title.x = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank()) + - xlab(" ") + scale_fill_discrete(name = "Method") + xlab(" ") + scale_fill_discrete(name = "Method", labels = method_names) figure_name <- file.path("Paper_Figs", paste0("f1_boxplots_", m, ".png")) ggsave(filename = figure_name, plot = p) @@ -74,7 +76,7 @@ plot_fnr <- function(m, a_min, a_max, iterations_df){ facet_grid(percent_addit ~ percent_path) + ylab("False Negative Rate") + theme(axis.title.x = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank()) + - xlab(" ") + scale_fill_discrete(name = "Method") + xlab(" ") + scale_fill_discrete(name = "Method", labels = method_names) figure_name <- file.path("Paper_Figs", paste0("fnr_boxplots_", m, ".png")) ggsave(filename = figure_name, plot = p) @@ -95,7 +97,7 @@ plot_fpr <- function(m, a_min, a_max, iterations_df){ facet_grid(percent_addit ~ percent_path) + ylab("False Positive Rate") + theme(axis.title.x = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank()) + - xlab(" ") + scale_fill_discrete(name = "Method") + xlab(" ") + scale_fill_discrete(name = "Method", labels = method_names) figure_name <- file.path("Paper_Figs", paste0("fpr_boxplots_", m, ".png")) ggsave(filename = figure_name, plot = p)