I am using grouped_ggwithinstats to make a boxplot for repeated measures of 2 groups for the fist time.
Variables:
- Group (pain-free and CWAD) (between-subjects factor),
- picture (High, moderate and neutral) (within subjects category).
- Dependent variable (variable1, continuous)
grouped_ggwithinstats(data = data, x = Picture, y = variable1,
grouping.var = Group, xlab = "Picture cateory", ylab = "variable1",
package = "RColorBrewer", palette = "Spectral",
annotation.args = list(title="Within-group comparison for picture category"))
#plotgrid.args = list(ncol = 1))
However, I cannot manage to:
- have the same scale for the y axis in both boxplots. I have tried with:
ggplot.component = ggplot2::scale_y_continuous(breaks = seq(-0.3, 0.6, 0.1), limits = (c(-0.3, 0.6)))
but this only scales the 2nd graph (right)
- have a different scale of colors in each group (e.g., pain-free group red and CWAD green)
Thanks so much in advance for your help!