Back to demo index

gnuplot demo script: fillbetween.dem

autogenerated by webify.pl on Sat Oct 1 21:06:05 2022
gnuplot version gnuplot 5.4 patchlevel 5
#
# Demonstrate filling the area between two curves
# and also the application of fillstyle to filled curves.
# Ethan Merritt  <merritt@u.washington.edu>
# June 2004
#
set title "Fill area between two curves"
set style data lines
set xrange [10:*]
set yrange [0:175]
plot 'silver.dat' u 1:2:3 "%lf %lf %lf" w filledcu, \
      '' u 1:2 lt -1 notitle, '' u 1:3 lt -1 notitle

Click here for minimal script to generate this plot


set style fill pattern 2
set title "Fill area between two curves (pattern fill)"
replot

Click here for minimal script to generate this plot


set title "Fill area between two curves (above/below)"
set style fill solid 1.0 noborder
set xrange [250:500]
set auto y
plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \
               '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \
	       '' u 1:2 lt -1 lw 2 title 'curve 1', \
	       '' u 1:($3+$1/50.) lt 3 lw 2 title 'curve 2'

Click here for minimal script to generate this plot


reset