title: Changing the colour of median and mean in ggplot2 legend
body: <p>Please ignore the random dots all over the graph - this is just a quick reproducible example to show what I mean:</p>
  <pre><code>ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, fill = Species)) + 
    geom_violin(alpha = 0.5) +
    stat_summary(aes(shape=&quot;mean&quot;,group=1),fun = &quot;mean&quot;,
                 size = 2, geom = &quot;point&quot;, color = &quot;black&quot;) +
    stat_summary(aes(shape = &quot;median&quot;, group = 2), fun = &quot;median&quot;,
                 size = 2, geom = &quot;point&quot;, color = &quot;red&quot;) +
    labs(x = &quot;Sepal Length&quot;, y = &quot;Sepal Width&quot;,
         shape = &quot;Shape&quot;, colour = &quot;Species&quot;) +
    theme_classic() 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Lsx41.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lsx41.png" alt="Iris Graph" /></a></p>
  <p>How do I:</p>
  <p>a). Change the legend so that there is no red dot in the middle of the box for each categorical variable?
  b). Change the colour of the &quot;shape&quot; legend so that &quot;mean&quot; is black and &quot;median&quot; is red?</p>
  <p>I have Googled for over an hour and cannot find the answer, so help would be much appreciated. Thanks!</p>