How to graph with geom_ribbon
<p>I have three tables:  </p>

<pre><code>Upper  Bound  
    Q      C   
    1     30  
    2     50  
    3     40

Lower  Bound      
    Q      C       
    1     10   
    2     15     
    3     20 
</code></pre>

<p>Bad Data:   </p>

<pre><code>Q      C      Name  
1      50     Sample 1  
2      40     Sample 1  
3      30     Sample 1  
1      0      Sample 2  
2      60     Sample 2  
3      5      Sample 2
</code></pre>

<p>I want a graph that graphs the lower and upper bounds in gray and fills everything  in between and graph the bad samples on top with different colors and a legend:</p>

<pre><code>plot &lt;- ggplot(Bad_Data, aes(x = Bad_Data$Q, y = Bad_Data$C, group = 1))
plot + geom_line(aes(color = N)) + geom_ribbon(aes(ymin = Lower_Bound$C, ymax = Upper_Bound$C))  
</code></pre>

<p>I tried that but it gave me this error:</p>

<blockquote>
  <p>Error: Aesthetics must be either length 1 or the same as the data (624): ymin, ymax, x, y, group</p>
</blockquote>

<p>Anyone who can help me?</p>