File: fillbetween.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,940 kB
  • sloc: ansic: 95,319; cpp: 7,590; makefile: 2,470; javascript: 2,328; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (34 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# 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
pause -1 "Hit return to continue"
set style fill pattern 2
set title "Fill area between two curves (pattern fill)"
replot
pause -1 "Hit return to continue"
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'
pause -1 "Hit return to continue"
set title "Fill area between two smoothed curves (above/below)"
plot 'silver.dat' u 1:2:($3+$1/50.) smooth csp w filledcurves above lt 3 title 'Above', \
               '' u 1:2:($3+$1/50.) smooth csp w filledcurves below lt 4 title 'Below', \
	       '' u 1:2 smooth csp with lines lt -1 lw 2 title 'curve 1', \
	       '' u 1:($3+$1/50.) smooth csp with lines lt 1 lw 2 title 'curve 2'
pause -1 "Hit return to continue"

reset