File: histograms2.dem

package info (click to toggle)
gnuplot 5.0.5%2Bdfsg1-6%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,800 kB
  • ctags: 8,062
  • sloc: ansic: 78,152; cpp: 6,981; makefile: 2,075; sh: 1,343; lisp: 655; perl: 302; awk: 235; pascal: 194; tcl: 88; python: 46
file content (70 lines) | stat: -rw-r--r-- 2,029 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
61
62
63
64
65
66
67
68
69
70
#
# Example of using histogram modes
#
reset
set title "US immigration from Europe by decade"
set datafile missing "-"
set xtics nomirror rotate by -45
set key noenhanced
#
# 'newhistogram' keyword to plot
#
set title "Default Histogram Colouring"
set key under
set key invert autotitle columnhead
set style data histogram
set style histogram clustered gap 1 title offset 2,-2 font ",11" boxed
set style fill solid noborder
set boxwidth 0.95
unset xtics
set xtics rotate by -45
set xlabel "Immigration from different regions" offset 0, 0
set ytics
set grid y
set auto y
set bmargin 12
#
plot \
newhistogram "Northern Europe", \
'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
newhistogram "Southern Europe", \
'' u 9:xtic(1), '' u 17 , '' u 22 , \
newhistogram "British Isles", \
'' u 10:xtic(1) , '' u 21 
#
pause -1 "Same plot using explicit histogram start colors"
set title "Explicit start color in 'newhistogram' command"
plot \
newhistogram "Northern Europe" lt 4, \
'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
newhistogram "Southern Europe" lt 4, \
'' u 9:xtic(1), '' u 17, '' u 22, \
newhistogram "British Isles" lt 4, \
'' u 10:xtic(1), '' u 21
#
#
pause -1 "Same plot using explicit histogram start pattern"
set title "Explicit start pattern in 'newhistogram' command"
set style fill pattern 1 border -1
plot \
newhistogram "Northern Europe" fs pattern 1, \
'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
newhistogram "Southern Europe" fs pattern 1, \
'' u 9:xtic(1), '' u 17, '' u 22, \
newhistogram "British Isles" fs pattern 1, \
'' u 10:xtic(1), '' u 21
#
#
pause -1 "Same plot with both explicit color and pattern"
set title "Explicit start pattern and linetype"
set style fill pattern 1 border -1
plot \
newhistogram "Northern Europe" lt 2 fs pattern 1, \
'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
newhistogram "Southern Europe" lt 2 fs pattern 1, \
'' u 9:xtic(1), '' u 17, '' u 22, \
newhistogram "British Isles" lt 2 fs pattern 1, \
'' u 10:xtic(1), '' u 21
#
#
pause -1