Change colours of violins
NicoBia90 opened this issue · comments
Is there a way to make the dots and lines to be presented in black and the violins to be coloured?
I've tried this code:
ggplot(mpg, aes(x = class, y = cty)) + geom_pirate(aes(colour = class),bars = FALSE, violins_params = list(fill = class, size = 0.5, alpha = 0, width = 0.7))
But I get the following error:
_
Error in rep(value[[k]], length.out = n) :
attempt to replicate an object of type 'builtin'
_
There's no way for the violins to be coloured, sorry. The list passed to violins_params
is only static parameters, not aesthetics. I would recommend calling geom_pirate()
with violins = FALSE
and then adding your own geom_violin()
.