File: waterfallplot.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 (45 lines) | stat: -rw-r--r-- 988 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
35
36
37
38
39
40
41
42
43
44
45
# Waterfall plot created using plot style "splot with filledcurves"
#
# Note that scan lines must be plotted from back to front
# in order for the depth-occlusion visual effect to work.
#

# Generate data
Gauss(x,mu,sigma) = 1./(sigma*sqrt(2*pi)) * exp( -(x-mu)**2 / (2*sigma**2) )
A(x) = Gauss(x, 0.2, 0.05)
B(x) = 0.8 * Gauss(x, 0.2 + s, 0.03)
C(x) = 0.1 * Gauss(x, 0.2 + 1.5*s, 0.02)

set xrange [0.0:1.0]
set sample 101

set table $DATA
s = 0.0
do for [j=1:50] {
    f = (75-j)/75.
    F(x) = f * A(x) + (1-f) * B(x) + C(x)
    plot F(x)
    s = s + 0.005
}
unset table

# set print "DATA"
# print $DATA

set title "Waterfall plot"   offset 0,-5
unset key
set view 42, 27, 1, 1.2
set xyplane at 0
set xtics scale 0
set ytics scale 0 10,10,50
set xrange [0:0.9]
set yrange [0:50]
set zrange [ 0.0 : 15.0 ]
set xlabel 'x'
set ylabel 'scan'

splot for [scan=48:2:-2] $DATA index scan \
      using 1:(scan):2 with filledcurves lc "black" fc background

pause -1 "<cr> to continue"
reset