File: fillstyle.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 (60 lines) | stat: -rw-r--r-- 1,572 bytes parent folder | download | duplicates (5)
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
# E A Merritt <merritt@u.washington.edu>          24-Sep-2002
#
# Demo for revised fillstyle code selected by 
# ./configure --enable-filledboxes --enable-relative-boxwidth
#
reset

set samples 25
unset xtics
unset ytics
set yrange [0:120]

set title "A demonstration of boxes with default properties"
plot [-10:10] 100/(1.0+x*x) title 'distribution' with boxes

pause -1 "Now draw the boxes with solid fill"

set title "A demonstration of boxes with style fill solid 1.0"
set style fill solid 1.0
replot

pause -1 "Now draw the boxes with a black border"

set title "A demonstration of boxes with style fill solid border -1"
set style fill solid border -1
replot

pause -1 "Now make the boxes a little less wide"

set title "Filled boxes of reduced width"
set boxwidth 0.5 
replot

pause -1 "And now let's try a different fill density"

set title "Filled boxes at 50% fill density"
set style fill solid 0.25 border
replot

pause -1 "Now draw the boxes with no border"

set title "A demonstration of boxes with style fill solid 0.25 noborder"
set style fill solid 0.25 noborder
replot

pause -1 "Or maybe a pattern fill, instead?"

set title "A demonstration of boxes in mono with style fill pattern"
set samples 11
set boxwidth 0.5 
set style fill pattern border
plot [-2.5:4.5] 100/(1.0+x*x) title 'pattern 0' with boxes lt -1, \
                 80/(1.0+x*x) title 'pattern 1' with boxes lt -1, \
                 40/(1.0+x*x) title 'pattern 2' with boxes lt -1, \
                 20/(1.0+x*x) title 'pattern 3' with boxes lt -1

pause -1 "Finished this demo"

reset