#!/usr/bin/gnuplot
#
# Gnuplot Script zur Erstellung des SVG-Dokuments
#
unset border
# using native size of 1200 * 720 = (2*2*2*2*3*5*5) * (2*2*2*2*3*3*5)
# so that size can be divided by 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 40, 48, 60, 80, 120, 240 without aliasing
set terminal svg size 1200 720 fname "DejaVu Sans,24" enhanced
set output "Operating_systems_used_on_top_500_supercomputers.svg"
set ylabel rotate by 0 "%" offset 3,1.0
set key invert reverse Left outside samplen 0.2
set xtics out scale 0.4,0.1 rotate by 90 offset 0.8,character -1.4 1990,5,2038 nomirror
set ytics out scale 0.1,0.1 0,10,100
set mxtics 5
set mytics 2
show mxtics
show mytics
set yrange [0:100]
set grid xtics mxtics ytics front \
linetype 3 linewidth 2 lc rgb "#e0000000",\
linetype 3 linewidth 1 lc rgb "#e0000000"
show grid
set label "Unix" at 1997,45 front font ",32" textcolor "light-cyan"
set label "Linux" at 2011,45 front font ",32" textcolor "green"
set label "NA/mixed" at 2006,95 front font ",16" textcolor "grey95"
set label "BSD" at 1994,97 front font ",16" textcolor "#fef000"
show label
plot \
'cpu.csv' using 1:(100-$7) :(100) title "Mac" with filledcurves lt rgb "#6f0085" ,\
'' using 1:($2+$4+$6+$3) :(100-$7) title "BSD" with filledcurves lt rgb "#f7c500" ,\
'' using 1:($2+$4+$6) :($2+$4+$6+$3) title "Windows" with filledcurves lt rgb "#00adef" ,\
'' using 1:($2+$4) :($2+$4+$6) title "NA/mixed" with filledcurves lt rgb "grey90" ,\
'' using 1:($2) :($2+$4) title "Unix" with filledcurves lt rgb "light-blue" ,\
'' using 1:(0) :($2) title "Linux" with filledcurves lt rgb "web-green"
#
# output same data with lines instead of filledcurves, plot two diagram in one
#
set output "Operating_systems_used_on_top_500_supercomputers_detail.svg"
set multiplot
#
# top plot
set size 1, 0.4
set origin 0, 0.6
set border
set bmargin 0.5
set yrange [0:100]
set xtics out scale 0.5,0.3 rotate by 90 offset 0.8,character -1.4 1990,5,2038 nomirror
set ytics out scale 0.2,0.2 0,20,100
# do not plot years in top plot
set format x ""
# do not plot legend in top plot
set key off
# use fixed width for y
set format y "%3g"
set ylabel rotate by 0 "%" offset 2.5,0
set grid xtics mxtics ytics back \
linetype 3 linewidth 2 dashtype 2 lc rgb "#e0000000",\
linetype 3 linewidth 2 dashtype 3 lc rgb "#e0000000"
unset label
plot '' using 1:2 title "Linux" with lines lw 5 lt rgb "web-green" ,\
'' using 1:4 title "Unix" with lines lw 5 lt rgb "light-blue" , \
'' using 1:5 title "BSD" with lines lw 5 lt rgb "#f7c500" ,\
'' using 1:3 title "Windows" with lines lw 5 lt rgb "#00adef" ,\
'' using 1:7 title "Mac" with lines lw 5 lt rgb "#6f0085" ,\
'' using 1:6 title "NA/mixed" with lines lw 5 lt rgb "grey80"
#
# bottom plot
set size 1, 0.6
set origin 0, 0.0
# plot years
set format x "%g"
set bmargin 5
set tmargin 0
set yrange [0:10]
set ytics out scale 0.2,0.2 0,2,9
set key below horizontal samplen 0.2 box lt rgb "grey"
replot
unset multiplot
set term pop
The above script also generates another diagram with detail view.