title: ggplot2: Dashed Line in legend
body: <p>I'm trying to create a histogram with two superimposed density plots. The problem: is I want one density to be a dashed line, which works perfectly but in the legend the dashed line will not appear, as in the following example</p>
  
  <pre><code>x&lt;-sort(rnorm(1000))
  data&lt;-data.frame(x=x,Normal=dnorm(x,mean(x),sd=sd(x)),Student=dt(x,df=3))
  
  ggplot(data,aes(y=x))+geom_histogram(aes(x=x,y=..density..),
  color="black",fill="darkgrey")+geom_line(aes(x=x,y=Normal,color="Normal"),size=1,
  linetype=2)+ylab("")+xlab("")+labs(title="Density estimations")+geom_line(aes(x=x,y=Student,color="Student"),size=1)+
  scale_color_manual(values=c("Student"="black","Normal"="black"))
  </code></pre>
  
  <p>Any ideas how I get the dashed line in the legend?</p>
  
  <p>Thank you very much!</p>
  
  <p>Rainer</p>
  
  <p><img src="https://i.stack.imgur.com/XPFVV.png" alt="Example Plot"></p>