0
$\begingroup$

i have a (ggplot) chart whit multiple data grouped by factor column. I also would like to add an "overall" group to it. Is there an easy way to do this?

For example i want to extend this plot with a overall boxplot

p <- ggplot(mtcars, aes(factor(cyl), mpg))

p + geom_boxplot()

regards, Ákos

$\endgroup$
0
$\begingroup$

Is this what you meant by overall?

library(ggplot2)
data(mtcars)

p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot() + geom_boxplot(aes('overall', mpg))
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.