File: hsteps.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 (116 lines) | stat: -rw-r--r-- 3,076 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# 2D plot style "with hsteps"
#	1) variations of connecting line shape
#

$data <<EOD
1 5
2 8
3 10
4 7
5 5
6 3
EOD

set border 3 lw 2 lc 'gray'
set style line 1 lw 2 lc "goldenrod"
set style line 2 lw 3 lc "red"
set xrange [ 0:10]
set yrange [-2:13]
unset tics
set key top right reverse Left samplen 2
set key offset 2,1

set multiplot layout 3,2

  set title offset 0,-1.5
  set label 1 "baseline" at 7, first 0 offset 0,0.5 
  set xzeroaxis

  set key title "full width"
  plot $data using 1:2 ls 1 with hsteps title "default", \
       $data using 1:2 ls 2 with hsteps nolink title "nolink"

  set key title "narrow width"
  plot $data using 1:2:(0.7) ls 1 with hsteps title "default", \
       $data using 1:2:(0.7) ls 2 with hsteps nolink  title "nolink"

  set key title "full width"
  plot $data using 1:2 ls 1 with hsteps pillar title "pillar", \
       $data using 1:2 ls 2 with hsteps nolink title "nolink"

  set key title "narrow width"
  plot $data using 1:2:(0.7) ls 1 with hsteps pillar title "pillar", \
       $data using 1:2:(0.7) ls 2 with hsteps nolink title "nolink"

  unset label 1
  unset xzeroaxis

  set key title "full width"
  plot $data using 1:2 ls 1 with hsteps link title "link", \
       $data using 1:2 ls 2 with hsteps nolink title "nolink"

  set key title "narrow width"
  plot $data using 1:2:(0.7) ls 1 with hsteps link title "link", \
       $data using 1:2:(0.7) ls 2 with hsteps nolink title "nolink"

unset multiplot
pause -1 "<cr> to continue"


#
# 2D plot style "with hsteps"
#	1) variations of connecting line shape
#
unset key
set xrange [0:7]

set multiplot layout 3,3 columnsfirst offset 0,0 scale 1.1,1.1

  set title "full width"
  plot $data using 1:2 ls 1 with hsteps, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "width 0.8"
  plot $data using 1:2:(0.8) ls 1 with hsteps, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "width 0.4"
  plot $data using 1:2:(0.4) ls 1 with hsteps, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "forward"
  plot $data using 1:2 ls 1 with hsteps forward, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "forward"
  plot $data using 1:2:(0.8) ls 1 with hsteps forward, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "forward"
  plot $data using 1:2:(0.4) ls 1 with hsteps forward, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "backward"
  plot $data using 1:2 ls 1 with hsteps backward, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "backward"
  plot $data using 1:2:(0.8) ls 1 with hsteps backward, \
       $data using 1:2 with points pt 7 ps 1 lc black

  set title "backward"
  plot $data using 1:2:(0.4) ls 1 with hsteps backward, \
       $data using 1:2 with points pt 7 ps 1 lc black

unset multiplot

pause -1 "<cr> to continue"

set yrange [-1:13]
set title "hsteps with variable fill color"
set style fill solid 0.5 border lc "black"
plot $data using 1:2:(0.7):1 with hsteps fc variable

pause -1 "<cr> to continue"
reset