lf_bp2: extend y

This commit is contained in:
Tanushree Tunstall 2022-10-11 12:01:46 +01:00
parent 763ffa55b8
commit 39fe2da8be

View file

@ -18,7 +18,7 @@ lf_bp2 <- function(lf_df #lf_duet
, y_scales = "free_y"
, colour_bp_strip = "khaki2"
, dot_size = 3
, dot_transparency = 0.3 #0.3: lighter
, dot_transparency = 0.2 #0.3: lighter
, violin_quantiles = c(0.25, 0.5, 0.75) # can be NULL
, line_thickness = 0.65
, my_ats = 22 # axis text size
@ -62,6 +62,8 @@ lf_bp2 <- function(lf_df #lf_duet
my_comparisonsL <- list( stat_grp_comp )
ggplot(lf_df, aes_string(x = x_grp, y = y_var)) +
# extend the y axis so there's always room for the stats
ylim(min(lf_df$param_value), max(lf_df$param_value)+max(lf_df$param_value)/4) +
facet_wrap(fwv
, nrow = n_facet_row
@ -75,8 +77,6 @@ lf_bp2 <- function(lf_df #lf_duet
, colour = "black"
#, position = position_dodge(width = 0.9)
, draw_quantiles = violin_quantiles) +
# extend the y axis so there's always room for the stats
ylim(min(lf_df$param_value), max(lf_df$param_value)+max(lf_df$param_value)/4) +
# Add formatting to graph
theme(axis.text.x = element_text(size = my_ats)