changing labels in graphs for frontiers journal
This commit is contained in:
parent
2f1f02e1de
commit
59911687c8
5 changed files with 39 additions and 12 deletions
|
@ -45,7 +45,8 @@ dev.off()
|
|||
svg(plot_bp_aa_subcols_combined_labelled, width = 26, height = 8)
|
||||
OutPlot_aa_subcols_combined_labelled = cowplot::plot_grid(OutPlot_aa_PS, OutPlot_aa_LIG
|
||||
, ncol = 1
|
||||
, labels = c("(c)", "(d)")
|
||||
#, labels = c("(c)", "(d)")
|
||||
, labels = c("C", "D")
|
||||
, label_size = 20
|
||||
, align = 'v'
|
||||
, hjust = -0.1)
|
||||
|
|
|
@ -99,5 +99,27 @@ 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)
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ source("combining_dfs_plotting.R")
|
|||
# output
|
||||
#=======
|
||||
# plot: with median line on hist
|
||||
af_or_combined_med = "hist_bp_muts_combined_median.svg"
|
||||
af_or_combined_med = "hist_bp_muts_combined_median_labelled.svg"
|
||||
plot_af_or_combined_med = paste0(plotdir, "/", af_or_combined_med)
|
||||
|
||||
# plot 6: without median line on hist
|
||||
|
@ -300,8 +300,9 @@ p1_af = cowplot::plot_grid(g_af_hist
|
|||
#, g_af_mutinfo # without median line
|
||||
, g_af_bp_stats
|
||||
, nrow = 1
|
||||
, labels = c("(a)", "(b)", "(c)")
|
||||
, hjust = -0.5
|
||||
#, labels = c("(a)", "(b)", "(c)")
|
||||
, labels = c("A", "B", "C")
|
||||
, hjust = -1.5
|
||||
, vjust = 0.2
|
||||
, rel_widths = c(1.2/4, 2/4, 0.8/4)
|
||||
, label_size = 18)
|
||||
|
@ -319,8 +320,9 @@ p2_or = cowplot::plot_grid(g_or_hist
|
|||
#, g_or_mutinfo # without median line
|
||||
, g_or_bp_stats
|
||||
, nrow = 1
|
||||
, labels = c("(d)", "(e)", "(f)")
|
||||
, hjust = -0.5
|
||||
#, labels = c("(d)", "(e)", "(f)")
|
||||
, labels = c("D", "E", "F")
|
||||
, hjust = -1.5
|
||||
, vjust = 0.2
|
||||
, rel_widths = c(1.2/4, 2/4, 0.8/4)
|
||||
, label_size = 18)
|
||||
|
|
|
@ -213,7 +213,8 @@ theme_set(theme_gray()) # to preserve default theme
|
|||
Outplot_or_combined_labelled = cowplot::plot_grid(plot_grid(p1, p2
|
||||
, ncol = 1
|
||||
, align = 'v'
|
||||
, labels = c("(a)", "(b)")
|
||||
, label_size = 20))
|
||||
#, labels = c("(a)", "(b)")
|
||||
, labels = "AUTO"
|
||||
, label_size = 26))
|
||||
print(Outplot_or_combined_labelled)
|
||||
dev.off()
|
|
@ -260,9 +260,10 @@ cat("combined plot Labelled:", plot_ps_combined_labelled)
|
|||
svg(plot_ps_combined_labelled , width = 26, height = 12)
|
||||
OutPlot_combined_labelled = cowplot::plot_grid(p1, p2, p3
|
||||
, ncol = 1
|
||||
, labels = c("(a)", "(b)", "(c)")
|
||||
, label_size = 21
|
||||
, align = 'v'
|
||||
#, labels = c("(a)", "(b)", "(c)")
|
||||
, labels = "AUTO"
|
||||
, label_size = 25
|
||||
, align = 'hv'
|
||||
, hjust = -0.4)
|
||||
OutPlot_combined_labelled
|
||||
dev.off()
|
||||
dev.off()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue