1
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
4
Gnuplot::Plot.new(gp) do |plot|
6
plot.title "Histogram example"
7
plot.style "data histograms"
8
plot.xtics "nomirror rotate by -45"
10
titles = %w{decade Austria Hungary Belgium}
12
["1891-1900", 234081, 181288, 18167],
13
["1901-1910", 668209, 808511, 41635],
14
["1911-1920", 453649, 442693, 33746],
15
["1921-1930", 32868, 30680, 15846],
16
["1931-1940", 3563, 7861, 4817],
17
["1941-1950", 24860, 3469, 12189],
18
["1951-1960", 67106, 36637, 18575],
19
["1961-1970", 20621, 5401, 9192],
22
x = data.collect{|arr| arr.first}
24
y = data.collect{|arr| arr[col]}
25
plot.data << Gnuplot::DataSet.new( [x, y] ) do |ds|
26
ds.using = "2:xtic(1)"
27
ds.title = titles[col]
b'\\ No newline at end of file'