diff --git a/dots-and-boxplots_live-vs-2018/LiveVs2018.png b/dots-and-boxplots_live-vs-2018/LiveVs2018.png new file mode 100644 index 0000000..54e7454 Binary files /dev/null and b/dots-and-boxplots_live-vs-2018/LiveVs2018.png differ diff --git a/msd-rankings-live-vs-2018.R b/msd-rankings-live-vs-2018.R index 45e5945..e615d3f 100644 --- a/msd-rankings-live-vs-2018.R +++ b/msd-rankings-live-vs-2018.R @@ -1,48 +1,44 @@ library(rstudioapi) current_path = rstudioapi::getActiveDocumentContext()$path setwd(dirname(current_path)) -library(challengeR) +library(readxl) ########################### # Read and prepare challenge data ########################### -path_2018 = 'data_not-public/results_2018.xlsx' -path_live = 'data_not-public/results_live.xlsx' -path_new = 'data_not-public/results_new.xlsx' - -data2018 <- read_excel(path2018) -datalive <- read_excel(pathlive) +path_new = 'data_not-public/results_2018-live.xlsx' data_msd <- read_excel(path_new) data_msd$Task <- factor(data_msd$Task, c("Brain", "Heart", "Hippocampus", "Liver", "Lung", "Pancreas", "Prostate", "Colon", "Hepatic vessel", "Spleen")) data_msd$Subtask <- factor(data_msd$Subtask, c("Edema", "Non-enhancing tumor", "Enhancing tumor", "Left atrium", "Anterior", "Posterior", "Liver", "Liver tumor", "Lung tumor", "Pancreas", "Pancreas tumor mass", "Prostate PZ", "Prostate TZ", "Colon cancer primaries", "Hepatic vessel", "Hepatic tumor", "Spleen")) ########################### # Plot DSC values as dots- and boxplots ########################### -ggplot(data_msd, aes(x=State, y=Values, fill=Subtask)) + +p <- ggplot(data_msd, aes(x=State, y=Values, fill=Subtask)) + geom_boxplot(outlier.shape=NA) + geom_point(position=position_jitterdodge(), alpha = 0.4, size=1, color = "#5e5858") + facet_grid(.~Task) + scale_y_continuous(breaks=c(0,0.5,1)) + xlab("") + ylab("DSC") + labs(fill = "Target ROI") + theme(axis.text.x = element_text(size = 13, angle = 90, vjust = 0.5, hjust=1), axis.text.y = element_text(size = 13), legend.text = element_text(size = 13), legend.title = element_text(size= 16), axis.title = element_text(size= 16), strip.text = element_text(size = 12), title = element_text(size=16), legend.position ="bottom" ) -ggsave(file="dots-and-boxplots_live-vs-2018/LiveVs2018", plot=p, width=11, height=13) +ggsave(file="dots-and-boxplots_live-vs-2018/LiveVs2018.png", + plot=p, width=13, height=9)