saving from my panino, made lineage dist plots

This commit is contained in:
Tanushree Tunstall 2022-08-04 13:46:58 +01:00
parent 1efb534f0f
commit e1b8e103ea
4 changed files with 12 additions and 501 deletions

View file

@ -19,6 +19,7 @@ lineage_distP <- function(plotdf
, facet_wrap_var = "" # FIXME: document what this is for
, fill_categ = "mutation_info_labels"
, fill_categ_cols = c("#E69F00", "#999999")
, label_categories = c("LABEL1", "LABEL2")
, my_ats = 15 # axis text size
, my_als = 20 # axis label size
, my_leg_ts = 16
@ -27,7 +28,8 @@ lineage_distP <- function(plotdf
, leg_pos = c(0.8, 0.9)
, leg_pos_wf = c("top", "left", "bottom", "right")
, leg_dir_wf = c("horizontal", "vertical")
, leg_label = "")
, leg_label = ""
, alpha = 0.7)
{
@ -41,10 +43,11 @@ lineage_distP <- function(plotdf
geom_density_ridges(aes_string(fill = fill_categ)
, scale = 3
, size = 0.3
, alpha = 0.8) +
, alpha = alpha) +
scale_x_continuous(expand = c(0.01, 0.01)) +
#coord_cartesian( xlim = c(-1, 1)) +
scale_fill_manual(values = fill_categ_cols) +
scale_fill_manual(values = fill_categ_cols
, labels = label_categories) +
theme(axis.text.x = element_text(size = my_ats
, angle = 90
, hjust = 1

View file

@ -62,10 +62,13 @@ stability_count_bp <- function(plotdf
, subtitle = subtitle_text
, y = yaxis_title) +
scale_fill_discrete(name = leg_title
, labels = label_categories) +
# scale_fill_discrete(name = leg_title
# , labels = label_categories) +
scale_fill_manual("", values=bar_fill_values)
scale_fill_manual(name = ""
# name = leg_title
, values = bar_fill_values
, labels = label_categories)
return(OutPlot_count)