added plots for thesis
This commit is contained in:
parent
41c4996426
commit
aabe466599
17 changed files with 24 additions and 2913 deletions
|
@ -34,6 +34,8 @@ lineage_plot_data <- function(df
|
|||
################################################################
|
||||
# Get WF and LF data with lineage count, and snp diversity
|
||||
################################################################
|
||||
|
||||
df[lineage_column_name] =
|
||||
# Initialise output list
|
||||
lineage_dataL = list(
|
||||
lin_wf = data.frame()
|
||||
|
|
|
@ -96,7 +96,7 @@ site_snp_count_bp <- function (plotdf
|
|||
# but atm being using as plot title
|
||||
#my_leg_title
|
||||
bp_plot_title = paste0("Total nsSNPs: ", tot_muts
|
||||
, ", Total no. of nsSNPs sites: ", tot_sites)
|
||||
, "\nTotal sites: ", tot_sites)
|
||||
|
||||
#-------------
|
||||
# start plot 2
|
||||
|
@ -123,7 +123,8 @@ site_snp_count_bp <- function (plotdf
|
|||
#, legend.text = element_text(size = leg_text_size)
|
||||
#, legend.title = element_text(size = axis_label_size)
|
||||
, plot.title = element_text(size = leg_text_size
|
||||
, colour = title_colour)
|
||||
, colour = title_colour
|
||||
, hjust = 0.5)
|
||||
, plot.subtitle = element_text(size = subtitle_size
|
||||
, hjust = 0.5
|
||||
, colour = subtitle_colour)) +
|
||||
|
|
|
@ -30,7 +30,8 @@ stability_count_bp <- function(plotdf
|
|||
, sts = 20
|
||||
, subtitle_colour = "pink"
|
||||
#, leg_position = c(0.73,0.8) # within plot area
|
||||
, leg_position = "top"){
|
||||
, leg_position = "top"
|
||||
, bar_fill_values = c("#F8766D", "#00BFC4")){
|
||||
|
||||
# OutPlot_count = ggplot(plotdf, aes(x = eval(parse(text = df_colname)))) +
|
||||
OutPlot_count = ggplot(plotdf, aes_string(x = df_colname)) +
|
||||
|
@ -57,8 +58,10 @@ stability_count_bp <- function(plotdf
|
|||
, subtitle = subtitle_text
|
||||
, y = yaxis_title) +
|
||||
scale_fill_discrete(name = leg_title
|
||||
#, labels = c("Destabilising", "Stabilising")
|
||||
, labels = label_categories)
|
||||
, labels = label_categories) +
|
||||
|
||||
scale_fill_manual("", values=bar_fill_values)
|
||||
|
||||
|
||||
return(OutPlot_count)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue