R ggplot: Change Grouped Boxplot Median line
<p>I have plotted grouped boxplots and now I would like to replace the standard black median line with a white line while keeping the borders in an other color. I'm following the instructions on the site <a href="http://biochemres.com/beautiful-minimalist-boxplots-with-r-and-ggplot2" rel="nofollow noreferrer">Minimalist Boxplots</a> because I really like their style.</p>

<p>They use the command <code>stat_summary(geom = "crossbar", width=0.65, fatten=0, color="white", fun.data = function(x){ return(c(y=median(x), ymin=median(x), ymax=median(x))) })</code>.
That command worked well with simple boxplots:
<a href="https://i.stack.imgur.com/1sbEs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1sbEs.png" alt="enter image description here"></a></p>

<p>But now that I'm trying to use it on my grouped boxplots its not working anymore (white median line is missing):</p>

<p><a href="https://i.stack.imgur.com/vUAJ3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vUAJ3.png" alt="enter image description here"></a></p>

<p>Here is my the code for reproducing my data:</p>

<pre><code>Data &lt;- data.frame(
  W = sample(1:100),
  M = sample(1:100),
  A = sample(1:100),
  O = sample(1:100),
  Type = sample(c("1", "2", "3", "4", "5")))
</code></pre>

<p>And my script:</p>

<pre><code>Data_Boxplot &lt;- melt(Data,id.vars='Type', measure.vars=c('W','M','A', 'O'))
Boxplots &lt;- ggplot(Data_Boxplot, aes(Type, value, group=variable)) +
  geom_boxplot(outlier.colour = NULL, aes(color=variable, fill=variable)) + 
  stat_summary(geom = "crossbar", width=0.65, fatten=0, color="white", 
               fun.data = function(x){c(y=median(x), ymin=median(x), ymax=median(x))})
Boxplots
</code></pre>

<p>What do I have to change? Thank you very much for your help.</p>