R violin plot fill color quantiles in ggplot or plotly

Viewed 241

Is it possible to have quantiles filled with different colors in the violin plot?

Using the iris data:

require(ggplot2)
    ggplot(iris, aes(Species, Sepal.Length)) +
    geom_violin(draw_quantiles = c(0.25, 0.5, 0.75))

we get the following violin plot where I would like to have the upper quantile filed red and the lower quantile filled blue

Violin plots

And if so if one know how to do this in plotly that would be even better!

0 Answers
Related