uclahs-cds / package-BoutrosLab-plotting-general

Functions to Create Publication-Quality Plots
https://uclahs-cds.github.io/package-BoutrosLab-plotting-general
11 stars 4 forks source link

`create.violinplot` missing `strip.cex` argument? #186

Open jarbet opened 3 months ago

jarbet commented 3 months ago

create.scatterplot, create.boxplot have arguments strip.cex, strip.col, strip.fontface to change the font when making multiple panels using the | operator.

However, these arguments are missing from create.violinplot.

In the meantime, a temporary solution is to assign the plot to an object, e.g. violin <- create.violinplot(...), then you can manually add text parameters. For example:

suppressPackageStartupMessages(library(BoutrosLab.plotting.general));
data(mtcars);

violin <- create.violinplot(
    formula = mpg ~ vs | am,
    data = mtcars
    );
violin;


violin$par.strip.text$cex <- 2;
violin;

Created on 2024-07-18 with reprex v2.0.2

EDIT: also missing the layout argument for specifying # cols/rows. In the meantime, can manually add as violin$layout <- c(n.cols, n.rows);