2 # Example of using histogram modes
5 set title "US immigration from Europe by decade"
6 set datafile missing "-"
7 set xtics nomirror rotate by -45
9 # 'newhistogram' keyword to plot
11 set title "Default Histogram Colouring"
14 set key autotitle columnhead
15 set style data histogram
16 set style histogram clustered gap 1 title offset 2,0.25
17 set style fill solid noborder
20 set xtics rotate by -45
21 set xlabel "Immigration from different regions" offset 0,-3
28 newhistogram "Northern Europe", \
29 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
30 newhistogram "Southern Europe", \
31 '' u 9:xtic(1), '' u 17, '' u 22, \
32 newhistogram "British Isles", \
33 '' u 10:xtic(1), '' u 21
35 pause -1 "Same plot using explicit histogram start colors"
36 set title "Explicit start color in 'newhistogram' command"
38 newhistogram "Northern Europe" lt 4, \
39 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
40 newhistogram "Southern Europe" lt 4, \
41 '' u 9:xtic(1), '' u 17, '' u 22, \
42 newhistogram "British Isles" lt 4, \
43 '' u 10:xtic(1), '' u 21
46 pause -1 "Same plot using explicit histogram start pattern"
47 set title "Explicit start pattern in 'newhistogram' command"
48 set style fill pattern 1 border -1
50 newhistogram "Northern Europe" fs pattern 1, \
51 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
52 newhistogram "Southern Europe" fs pattern 1, \
53 '' u 9:xtic(1), '' u 17, '' u 22, \
54 newhistogram "British Isles" fs pattern 1, \
55 '' u 10:xtic(1), '' u 21
58 pause -1 "Same plot with both explicit color and pattern"
59 set title "Explicit start pattern and linetype"
60 set style fill pattern 1 border -1
62 newhistogram "Northern Europe" lt 2 fs pattern 1, \
63 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \
64 newhistogram "Southern Europe" lt 2 fs pattern 1, \
65 '' u 9:xtic(1), '' u 17, '' u 22, \
66 newhistogram "British Isles" lt 2 fs pattern 1, \
67 '' u 10:xtic(1), '' u 21