title: color ribbon in ggplot2 per group
body: <p>I am trying to plot multiple line charts with a ribbon in <code>ggplot2</code>. The following code gives me a black ribbon around the colored line, whereas I actually I want the ribbon to have the same color as the line.</p>
  
  <pre><code>ggplot(newdf,aes(x=date,y=value,group=variable,color=variable)) + 
    geom_line() + 
    facet_grid(variable ~.) +
    scale_x_date() +
    geom_ribbon(aes(ymin=0, ymax=value)) +
    theme(legend.position='none') +
    geom_line(aes(y=0),linetype="dotted")
  </code></pre>
  
  <p>This gives me a black ribbon as in the image below <img src="https://i.stack.imgur.com/JdHih.jpg" alt="enter image description here"></p>
  
  <p>I was thinking of setting <code>fill = variable</code> as per below:</p>
  
  <pre><code>ggplot(newdf,aes(x=date,y=value,group=variable,color=variable)) + 
    geom_line() + 
    facet_grid(variable ~.) +
    scale_x_date() +
    geom_ribbon(aes(ymin=0, ymax=value), fill = variable) +
    theme(legend.position='none') +
    geom_line(aes(y=0),linetype="dotted")
  </code></pre>
  
  <p>However, this gives me the following error:</p>
  
  <blockquote>
    <p>Error in do.call("layer", list(mapping = mapping, data = data, stat =
    stat,  : object 'variable' not found</p>
  </blockquote>
  
  <p>The <code>newdf</code> is a <code>data.frame</code> and looks like this</p>
  
  <pre><code>&gt;head(newdf)
      date     variable      value
  1 2014-01-02    CHINA -0.3163197
  2 2014-01-03    CHINA -0.2820751
  3 2014-01-06    CHINA -0.3256087
  4 2014-01-07    CHINA -0.3741991
  5 2014-01-08    CHINA -0.4064004
  6 2014-01-09    CHINA -0.3630387
  </code></pre>
  
  <p>How do I color the ribbon correctly?</p>