File: smooth_path.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 (59 lines) | stat: -rw-r--r-- 1,067 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Along-path cubic spline smoothing
#
$CURVES << EOD
1   2
1.5 2
2   2.5
3   5
2.5 5
1.5 4

3   3
3.5 3.1
3.7 3.2
3.6 3.7
3.5 4.0
3.2 3.5
3   3

1 5
2 5
3 6
1 5
EOD

set xrange [0:6]
set yrange [0:6.2]
set border 3
set tics nomirror
set style fill transparent solid 0.2 border lt 8

set title "Along-path spline fit to multiple sets of points\n"

plot $CURVES using 1:2 with points ps 2 lc "steelblue" title "original points", \
     '' using 1:2 smooth path with filledcurves closed title "smooth path with filledcurves closed"

pause -1 "<cr> to continue"

$LOOP << EOD
1.5 0.5
2.5 0.5
3   1.0
3.5 1.5
4.0 3.5
3.6 4.5
3.0 2.5
4   1.5
5   1.5
EOD

set title "Along-path spline fit to multiple sets of points\n(some open and some closed)"
plot $CURVES using 1:2 with points pt 7 ps 2 lc "steelblue" title "original points", \
     '' using 1:2 smooth path with lines lt 3 title "smooth path with lines", \
     $LOOP using 1:2 with points pt 7 ps 2 lc "steelblue" notitle, \
     '' using 1:2 smooth path with lines lt 3 notitle

pause -1 "<cr> to continue"

reset