#!/usr/local/bin/gnuplot -persist # set terminal pngcairo background "#ffffff" enhanced font "arial,8" fontscale 1.0 size 500, 300 # set output 'circles.1.png' set style fill solid 1.00 border lt -1 set angles degrees set object 1 rect from graph 0, 0 to graph 1, 1 set object 1 behind clip lw 1.0 dashtype solid fc rgb "cyan" fillstyle solid 0.20 border lt -1 set style textbox opaque margins 0.0, 0.0 fc rgb "white" border lt -1 linewidth 1.0 unset parametric set style data lines set title "Sources of energy production, plotted for each continent" set xlabel "Dynamically generated pie charts" set xrange [ -180.000 : 180.000 ] noreverse nowriteback set x2range [ * : * ] noreverse writeback set yrange [ -70.0000 : 90.0000 ] noreverse nowriteback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set palette positive nops_allcF maxcolors 0 gamma 1.5 color model HSV set palette functions gray*0.75, 0.75, 0.99 set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault unset colorbox NO_ANIMATION = 1 keyx = -145.0 keyy = -30.0 keyr = 20.0 Scale = 3000.0 EnergyTypes = 6 Regions = 8 array EnergySum[8] = [2359412.0,260433.0,1532789.0,2042507.0,555961.0,528896.0,2214401.0,213900.0] Total = 213900.0 ## Last datafile plotted: "WorldEnergy.dat" plot 'world.dat' using 1:2 with filledcurves lc rgb "bisque" notit, for [i=1:EnergyTypes] for [j=1:Regions] 'WorldEnergy.dat' using 2:1: (Total = (sum [col=4:9] column(col)), sqrt(Total/Scale)):(EnergySum[j]*360./Total): (EnergySum[j]=EnergySum[j]+column(i+3), EnergySum[j]*360./Total):(i-1) every ::j:0:j:0 with circles lc pal fs transparent solid 0.8 border lc "black" not, '' using 2:($1-10):3:0 with labels not, for [i=1:EnergyTypes] '' using (keyx):(keyy):(keyr): ((i-1)*360./EnergyTypes):(i*360./EnergyTypes):(i-1) every ::0:0:0:0 with circles lc pal fs solid 1.0 border lc "black" not, for [i=1:EnergyTypes] '' using (keyx+keyr*cos((i-0.5)*360./EnergyTypes)): (keyy+keyr*sin((i-0.5)*360./EnergyTypes)):(stringcolumn(i+3)) every ::0:0:0:0 with labels center not