title: Gnuplot shading between two curves for two data sets
body: <p>I have gnuplot code to shade the area between two curves. I.e. an error region like mean +- stddev. The mean and stddev are rows in a data file. Now I have two such data files and I want them in the same plot. I just appended the plot cmds but it appears the second curve doesn't get the shaded fill. I am using pngcairo terminal.</p>
  
  <p>Data1:</p>
  
  <pre><code> 0.550 -0.131323 0.280289
   0.570 -0.145116 0.264563
   0.600 -0.275901 0.298501
   0.625 0.031135 0.277453
   0.660 -0.302773 0.300036
   0.700 0.039286 0.372996
   0.780 -0.099013 0.294711
   0.840 0.007641 0.294503
   0.960 -0.033036 0.435880
  </code></pre>
  
  <p>Data2:</p>
  
  <pre><code> 0.500 0.013809 0.028914
   0.550 -0.025318 0.038805
   0.570 -0.081928 0.042251
   0.600 -0.083926 0.060722
   0.625 -0.043033 0.074957
   0.660 0.027737 0.109750
   0.700 -0.017666 0.098800
   0.780 -0.252330 0.240454
   0.840 0.069862 0.231550
   0.960 -0.123103 0.504706
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code> data1 = "data1.dat"
   data2 = "data2.dat"
   set terminal pngcairo size 1200,800
   set output plot.png
   set grid ytics lw 1 lt 0
   set grid xtics lw 1 lt 0
   plot data1 using 1:2 with linespoints lc "black" title 'Mean', \
        data1 using 1:($2-$3)  with linespoints lc "blue" title 'Mean-sigma', \
        data1 using 1:($2+$3)  with linespoints lc "blue" title 'Mean+sigma', \
        data1 using 1:($2-$3):($2+$3) with filledcurves lc "skyblue" fs transparent solid 0.5 notitle, \
        data2 using 1:2 with linespoints lc "black" title 'Mean', \
        data2 using 1:($2-$3)  with linespoints lc "red" title 'Mean-sigma', \
        data2 using 1:($2+$3)  with linespoints lc "red" title 'Mean+sigma', \
        data2 using 1:($2-$3):($2+$3) with filledcurves lc "tomato" fs transparent solid 0.5 notitle
   set output
   set term X11
  </code></pre>
  
  <p>Undesired output missing tomato shaded region in second data set. If it is possible to shade the second region I would wish that where both areas overlap a mixed color is applied.</p>
  
  <p><a href="https://i.stack.imgur.com/pnHG5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pnHG5.png" alt="enter image description here"></a></p>
  
  <p>You input is appreciated.</p>