Create a violin plot where the violin and boxplot are of different colours in ggplot2
<p>I am trying to create a grouped violin plot (see figure), where I am plotting 3 levels for four categorical variables. The plot comes out fine given the data other than the fact that the boxes are the same colour as the wider violin plots behind making them difficult to view. Ideally I would like all the boxes to remain white throughout. I understand that the reason the boxes are changing colour is in response to the <code>fill</code> that I have chosen. I am wondering if there is a way to separate the fill for the <code>geom_violin</code> from the <code>geom_boxplot</code>.</p>

<p>Here is the stripped down code I am using</p>

<pre><code>p &lt;- ggplot(df, aes(x=metric, y=value, fill=variable))+
geom_violin(width=0.9, position=position_dodge(0.75), bw=1.5)+
geom_boxplot(width=0.3, outlier.shape = NA, position=position_dodge(0.75))+
scale_fill_manual(values=c("gray50", "gray75", "gray100"),
                breaks=c("res.error.random", "res.error.increase", "res.error.decrease"),
                labels=c("random cost", "overestimated", "underestimated"))
</code></pre>

<p><a href="http://i.stack.imgur.com/FGL5G.jpg" rel="nofollow">Example of the plot I am creating</a></p>