title: How to change the linetype for ellipses in ggplot2 with stat_ellipse?
body: <p>So I'm trying to change the line type on ellipses generated from stat_ellipse in ggplot2 (see here <a href="https://raw.github.com/low-decarie/FAAV/master/r/stat-ellipse.R" rel="nofollow noreferrer">https://raw.github.com/low-decarie/FAAV/master/r/stat-ellipse.R</a>). I can manually set the colors easily enough, but I'd like to give it a vector of linetypes that would change the linetype of the ellipse. I've tried setting the linetypes in the stat_ellipse() function, and separately also with the +scale_linetype_manual but only a single value for line type seems to work in the stat_ellipse function, and the scale_linetype_manual doesn't do anything. Any advice is appreciated!</p>
  
  <p>Basic code and example image is </p>
  
  <pre><code>ggplot(data.df,aes(x = PC1,y =PC2, color = mapping$Description))+
    geom_point(size=5,aes(shape=factor(mapping$Status)))+
    stat_ellipse(aes(x = PC1,y=PC2,fill=factor(mapping$Description)),
      geom="polygon",level=0.8,alpha=0.2)+
    scale_fill_manual(values=c("red","red","green","blue","blue"))
  </code></pre>
  
  <p>The mapping$... are just factors. PC1 and PC2 are just vectors with the principle components and data.df is just a data frame with all of those things in it.</p>
  
  <p><img src="https://i.stack.imgur.com/CpT9e.png" alt="enter image description here"></p>