# set terminal canvas solid butt size 600,400 fsize 10 lw 1 fontscale 1 name "histograms_5" jsdir "." # set output 'histograms.5.js' set border 3 front linetype -1 linewidth 1.000 set boxwidth 0.75 absolute set style fill solid 1.00 border lt -1 set grid nopolar set grid noxtics nomxtics ytics nomytics noztics nomztics \ nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000 set key outside right top vertical Left reverse noenhanced autotitles columnhead nobox set key invert samplen 4 spacing 1 width 0 height 0 set style histogram rowstacked title offset character 0, 0, 0 set datafile missing '-' set style data histograms set xtics border in scale 0,0 nomirror rotate by -45 offset character 0, 0, 0 autojustify set xtics norangelimit font ",8" set xtics () set noytics set title "US immigration from Europe by decade\nFraction of total plotted as stacked histogram" set ylabel "% of total" set yrange [ 0.00000 : 100.000 ] noreverse nowriteback i = 23 plot 'immigration.dat' using (100.*$2/$24):xtic(1) t column(2), for [i=3:23] '' using (100.*column(i)/column(24)) title column(i)