title: How to add legend to geom_vline in facet histograms?
body: <p>I plotted 3 histograms using facet view and added vlines for mean and median. </p>
  
  <p><img src="https://i.stack.imgur.com/y5ceN.png" alt="enter image description here"></p>
  
  <p>I would like to add a legend to indicate which vline refers to which statistic.</p>
  
  <pre><code>ggplot(x, aes(x=earnw)) + geom_histogram(binwidth=100, colour="black", fill="white")  +
  facet_grid(tuyear ~ .)  +
   geom_vline(data=a, aes(xintercept=earnw.mean), linetype="dashed", size=1,   color="mean") +
   geom_vline(data=b, aes(xintercept=earnw.med), linetype="dashed", size=1, color="median") +
   scale_color_manual(name = "statistics", values = c("mean" &lt;- "red", "median" &lt;- "blue")) +
   labs(title="Histogram for Weekly Earnings of Respondents") + 
   labs(x="Weekly Earnings of Respondents", y="Count") +
   scale_x_continuous(breaks=seq(0,3000,200),lim=c(0,3000)) 
  </code></pre>
  
  <p>The folllowing code returns error: </p>
  
  <blockquote>
    <p>Error in grDevices::col2rgb(colour, TRUE) :  invalid colour name 'mean'</p>
  </blockquote>