gnuplot

Struggling to merge multiples charts in one and keeping it clear with Gnuplot


Before I had four charts in Gnuplot to convey my information about my data. However, it was required for me to show everything in one unique chart since all charts are conveying related data but on different scales. For instance, for scale (8:8) I use X, scale (16:16) I use +, scale (8:16) I use square, and scale (8:24) I use a circle.

enter image description here

The problem that I stated is that it will become messy eventually and the chart will look very dirty in terms of readable. But, maybe, Gnuplot offers a better solution to me that I still don't know. Here is my Gnuplot code and the data files can be found here.

#!/usr/bin/gnuplot

reset session

set style line 1 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # auto-combiner input    throughput - 8combines.8reducers
set style line 2 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # auto-combiner output   throughput - 8combines.8reducers
set style line 3 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # static-combiner input  throughput - 8combines.8reducers
set style line 4 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # static-combiner output throughput - 8combines.8reducers
set style line 5 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # no-combiner input      throughput - 8combines.8reducers
set style line 6 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # no-combiner output     throughput - 8combines.8reducers
set style line 7 lc rgb '#008000' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # auto-combiner average processing latency         - 8combines.8reducers
set style line 8 lc rgb '#9ACD32' lt 1 lw 1.0 ps 0.4 pt 2 pi 15 # auto-combiner 99th percentile processing latency - 8combines.8reducers

set style line 9 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # auto-combiner input    throughput - 16combines.16reducers
set style line 10 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # auto-combiner output   throughput - 16combines.16reducers
set style line 11 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # static-combiner input  throughput - 16combines.16reducers
set style line 12 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # static-combiner output throughput - 16combines.16reducers
set style line 13 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # no-combiner input      throughput - 16combines.16reducers
set style line 14 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # no-combiner output     throughput - 16combines.16reducers
set style line 15 lc rgb '#008000' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # auto-combiner average processing latency         - 16reducers.8reducers
set style line 16 lc rgb '#9ACD32' lt 1 lw 1.0 ps 0.4 pt 1 pi 15 # auto-combiner 99th percentile processing latency - 16reducers.8reducers

set style line 17 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # auto-combiner input    throughput - 8combines.16reducers
set style line 18 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # auto-combiner output   throughput - 8combines.16reducers
set style line 19 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # static-combiner input  throughput - 8combines.16reducers
set style line 20 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # static-combiner output throughput - 8combines.16reducers
set style line 21 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # no-combiner input      throughput - 8combines.16reducers
set style line 22 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # no-combiner output     throughput - 8combines.16reducers
set style line 23 lc rgb '#008000' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # auto-combiner average processing latency         - 8combines.16reducers
set style line 24 lc rgb '#9ACD32' lt 1 lw 1.0 ps 0.3 pt 5 pi 15 # auto-combiner 99th percentile processing latency - 8combines.16reducers

set style line 25 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # auto-combiner input    throughput - 8combines.24reducers
set style line 26 lc rgb '#3274D9' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # auto-combiner output   throughput - 8combines.24reducers
set style line 27 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # static-combiner input  throughput - 8combines.24reducers
set style line 28 lc rgb '#FF780A' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # static-combiner output throughput - 8combines.24reducers
set style line 29 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # no-combiner input      throughput - 8combines.24reducers
set style line 30 lc rgb '#E02F44' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # no-combiner output     throughput - 8combines.24reducers
set style line 31 lc rgb '#008000' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # auto-combiner average processing latency         - 8combines.24reducers
set style line 32 lc rgb '#9ACD32' lt 1 lw 1.0 ps 0.35 pt 7 pi 15 # auto-combiner 99th percentile processing latency - 8combines.24reducers

set term pdfcairo size 5.0in,3.5in
set pointintervalbox 0
set datafile separator ','
set output "efficiency-throughput-networkbuffer-TaxiRideNYC-500K-merged.pdf"
set title "Efficiency evaluation: throughput vs. network buffer usage\nworkload of 500K rec/sec and different topologies" font ",16" offset 0,0.5,0
myTimeFmt = "%Y-%m-%d %H:%M:%S"
set xtics nomirror

set key under center maxrows 1 horizontal
set key font ",9"
set ylabel "Throughput (K rec/sec)" font ",10" #offset 1,0,0
set xtics font ",8" offset 0,0.5,0
set format x "%tH:%tM" time
set xlabel "time (hour:minute)" font ",10" offset 0,1,0
set xrange [0:5400]
set yrange [0:7]
set y2label "Combiner buffer usage" font ",10" #offset -1.5,0,0
set y2range [20:100]
set ytics nomirror font ",10"
set y2tics 0, 20  font ",10"
set format y2 "%g%%"
plot t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(6)) skip 2 notitle "auto-combiner avg. buffer usage (8:8)" with linespoints ls 7 axis x1y2 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(6)/1000):(column(7)/1000) skip 2 title "auto-combiner avg. buffer usage (8:8)" with yerrorbars ls 7 axis x1y2 \
, t=0 "throughput-vs-networkbuffer-500K-16combiners-16reducers-static-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "static-combiner input throughput (16:16)" with linespoints ls 11 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-16combiners-16reducers-static-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "static-combiner input throughput (16:16)" with yerrorbars ls 11 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-16reducers-static-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "static-combiner input throughput (8:16)" with linespoints ls 19 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-16reducers-static-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "static-combiner input throughput (8:16)" with yerrorbars ls 19 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-24reducers-static-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "static-combiner input throughput (8:24)" with linespoints ls 27 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-24reducers-static-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "static-combiner input throughput (8:24)" with yerrorbars ls 27 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-static-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "static-combiner input throughput (8:8)" with linespoints ls 3 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-static-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "static-combiner input throughput (8:8)" with yerrorbars ls 3 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-16reducers-no-combiner-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000) skip 2 notitle "no-combiner input throughput (8:16)" with linespoints ls 21 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-16reducers-no-combiner-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000):(column(5)/1000) skip 2 title "no-combiner input throughput (8:16)" with yerrorbars ls 21 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-16combiners-16reducers-no-combiner-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000) skip 2 notitle "no-combiner throughput (16:16)" with linespoints ls 13 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-16combiners-16reducers-no-combiner-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000):(column(5)/1000) skip 2 title "no-combiner throughput (16:16)" with yerrorbars ls 13 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-24reducers-no-combiner-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000) skip 2 notitle "no-combiner input throughput (8:24)" with linespoints ls 29 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-24reducers-no-combiner-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000):(column(5)/1000) skip 2 title "no-combiner input throughput (8:24)" with yerrorbars ls 29 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-no-combiner-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000) skip 2 notitle "no-combiner throughput (8:8)" with linespoints ls 5 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-no-combiner-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000):(column(5)/1000) skip 2 title "no-combiner throughput (8:8)" with yerrorbars ls 5 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-16combiners-16reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "auto-combiner input throughput (16:16)" with linespoints ls 9 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-16combiners-16reducers-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "auto-combiner input throughput (16:16)" with yerrorbars ls 9 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "auto-combiner input throughput (8:8)" with linespoints ls 1 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-8reducers-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "auto-combiner input throughput (8:8)" with yerrorbars ls 1 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-16reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "auto-combiner input throughput (8:16)" with linespoints ls 17 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-16reducers-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "auto-combiner input throughput (8:16)" with yerrorbars ls 17 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-24reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle "auto-combiner input throughput (8:24)" with linespoints ls 25 axis x1y1 \
, t=0 "throughput-vs-networkbuffer-500K-8combiners-24reducers-all.csv" every 10 u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000):(column(3)/1000) skip 2 title "auto-combiner input throughput (8:24)" with yerrorbars ls 25 axis x1y1 \

The first thing that I would ask is to merge the legends into groups of X, +, squares, and circles. However, I think that the chart is still a big mess. How would one show all information that I have in a clear way using only one chart? I think I will probably have to remove some lines in the end. But I would like to know other alternatives before going to it.


Solution

  • I ended up using the fence plot constructed with separate parametric surfaces of Gnuplot 3D with splot available here.

    enter image description here