0

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:

  1. 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)

  1. have a different scale of colors in each group (e.g., pain-free group red and CWAD green)

enter image description here

Thanks so much in advance for your help!

stefan
  • 46,681
  • 5
  • 18
  • 35
  • Welcome to SO! To help us help you would you mind providing a [minimal reproducible example](https://stackoverflow.com/q/5963269/12993861) of your issue inclduing a snippet of your data, the packages you used, ....? – stefan Nov 23 '21 at 14:01

0 Answers0