diff --git a/scripts/plotting/ggridges_lineage_country.R b/scripts/plotting/ggridges_lineage_country.R index eb4e6ab..ef91623 100644 --- a/scripts/plotting/ggridges_lineage_country.R +++ b/scripts/plotting/ggridges_lineage_country.R @@ -253,3 +253,37 @@ p2 = ggplot(df, aes(x = duet_scaled p2 + +#=============== +# lineage only +#================ +#svg(plot_lineage_duet) +p3 = ggplot(df, aes(x = duet_scaled + , y = duet_outcome))+ + geom_density_ridges_gradient(aes(fill = ..x..) + , jittered_points = TRUE + , scale = 3 + , size = 0.3 ) + + facet_wrap( ~lineage + , scales = "free" + #, switch = 'x' + , labeller = labeller(lineage = my_labels) ) + + coord_cartesian( xlim = c(-1, 1)) + + scale_fill_gradientn(colours = c("#f8766d", "white", "#00bfc4") + , name = "DUET" ) + + theme(axis.text.x = element_text(size = my_ats + , angle = 90 + , hjust = 1 + , vjust = 0.4) + + , axis.text.y = element_blank() + , axis.title.x = element_blank() + , axis.title.y = element_blank() + , axis.ticks.y = element_blank() + , plot.title = element_blank() + , strip.text = element_text(size = my_als) + , legend.text = element_text(size = my_als-5) + , legend.title = element_text(size = my_als) + ) + +print(p3)