diff --git a/scripts/plotting/basic_barplots_LIG.R b/scripts/plotting/basic_barplots_LIG.R index dd14d79..b235e3a 100755 --- a/scripts/plotting/basic_barplots_LIG.R +++ b/scripts/plotting/basic_barplots_LIG.R @@ -94,7 +94,7 @@ OutPlot_lig_count = g + geom_bar(aes(fill = ligand_outcome) , legend.title = element_text(size=my_als) , plot.title = element_blank()) + labs(title = "" - , y = "Number of SNPs" + , y = "Number of nsSNPs" #, fill="ligand_outcome" ) + scale_fill_discrete(name = "Ligand Outcome" @@ -182,7 +182,7 @@ OutPlot_lig_pos_count = g + geom_bar(aes (alpha = 0.5) , axis.title.y = element_text(size = my_als) , plot.title = element_blank()) + - labs(x = "Number of SNPs" + labs(x = "Number of nsSNPs" , y = "Number of Sites") print(OutPlot_lig_pos_count) diff --git a/scripts/plotting/basic_barplots_PS.R b/scripts/plotting/basic_barplots_PS.R index aaab947..1d6e681 100755 --- a/scripts/plotting/basic_barplots_PS.R +++ b/scripts/plotting/basic_barplots_PS.R @@ -92,7 +92,7 @@ OutPlot_count = g + geom_bar(aes(fill = duet_outcome) , legend.title = element_text(size=my_als) , plot.title = element_blank()) + labs(title = "" - , y = "Number of SNPs" + , y = "Number of nsSNPs" #, fill="DUET Outcome" ) + scale_fill_discrete(name = "DUET Outcome" @@ -180,7 +180,7 @@ OutPlot_pos_count = g + geom_bar(aes (alpha = 0.5) , axis.title.y = element_text(size = my_als) , plot.title = element_blank()) + - labs(x = "Number of SNPs" + labs(x = "Number of nsSNPs" , y = "Number of Sites") print(OutPlot_pos_count) diff --git a/scripts/plotting/basic_barplots_foldx.R b/scripts/plotting/basic_barplots_foldx.R index 66d8029..3f49b86 100755 --- a/scripts/plotting/basic_barplots_foldx.R +++ b/scripts/plotting/basic_barplots_foldx.R @@ -71,7 +71,7 @@ theme_set(theme_grey()) # start plot 1 #-------------- g = ggplot(df, aes(x = foldx_outcome)) -OutPlot_count = g + geom_bar(aes(fill = foldx_outcome) +foldx_outcome_count = g + geom_bar(aes(fill = foldx_outcome) , show.legend = TRUE) + geom_label(stat = "count" , aes(label = ..count..) @@ -87,39 +87,15 @@ OutPlot_count = g + geom_bar(aes(fill = foldx_outcome) , legend.title = element_text(size=my_als) , plot.title = element_blank()) + labs(title = "" - , y = "Number of SNPs" + , y = "Number of nsSNPs" #, fill="FoldX Outcome" ) + scale_fill_discrete(name = "FoldX Outcome" , labels = c("Destabilising", "Stabilising")) -print(OutPlot_count) +print(foldx_outcome_count) dev.off() table(df$foldx_outcome) #======================================================================= -g = ggplot(df, aes(x = foldx_outcome)) -OutPlot_count = g + geom_bar(aes(show.legend = TRUE)) + - geom_label(stat = "count" - , aes(label = ..count..) - , color = "black" - , show.legend = FALSE - , size = 10) + - theme(axis.text.x = element_blank() - , axis.title.x = element_blank() - , axis.title.y = element_text(size=my_als) - , axis.text.y = element_text(size = my_ats) - , legend.position = c(0.73,0.8) - , legend.text = element_text(size=my_als-2) - , legend.title = element_text(size=my_als) - , plot.title = element_blank()) + - labs(title = "" - , y = "Number of SNPs" - #, fill="FoldX Outcome" - ) + scale_fill_manual("legend", values = c("Destabilising" = "black", "Stabilising" = "orange")) + - scale_fill_discrete(name = "FoldX Outcome" - , labels = c("Destabilising", "Stabilising")) - -print(OutPlot_count) -