title: Custom legend for multiple layer ggplot
body: <p>I'm trying to get a custom legend for a ggplot with data coming from two separate data frames. See below for a minimum reproducible example.</p>
  
  <p>What I'm trying to accomplish is to have a legend describing the ribbon fill, the black line, and the red line.</p>
  
  <pre><code>require(ggplot2)
  x=seq(1,10,length=100)
  data=data.frame(x,dnorm(x,mean=6.5,sd=1))
  names(data)=c('x','new.data')
  x.ribbon=seq(1,10,length=20)
  ribbon=data.frame(x.ribbon,
                    dnorm(x.ribbon,mean=5,sd=1)+.01,
                    dnorm(x.ribbon,mean=5,sd=1)-.01,
                    dnorm(x.ribbon,mean=5,sd=1))
  names(ribbon)=c('x.ribbon','max','min','avg')
  ggplot()+geom_ribbon(data=ribbon,aes(ymin=min,ymax=max,x=x.ribbon),fill='lightgreen')+
    geom_line(data=ribbon,aes(x=x.ribbon,y=avg),color='black')+
    geom_line(data=data,aes(x=x,y=new.data),color='red')+
    xlab('x')+ylab('density')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/x01Tq.png" alt="enter image description here"></p>