plot: add gnuplot 5 support
authorSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 17 Jul 2016 07:35:14 +0000 (08:35 +0100)
committerSitsofe Wheeler <sitsofe_wheeler@stormagic.com>
Sun, 17 Jul 2016 08:03:27 +0000 (09:03 +0100)
commit11822c0bcc03ebcb893bfcb6490c8a1422fcd28e
treeb6375232f23ee906015f8217fa928369f0f1ae94
parent45213f1b15f820e6791118b7200a1185e2af7d87
plot: add gnuplot 5 support

gnuplot 5 no longer supports using old-style ($1, $2 etc.) gnuplot 4 parameter
substituion causing fio2gnuplot to break on newer Linux distributions.

Fix this by using new-style arg variables everywhere and conditionally convert
old-style substituions to new-style variables. Add some casting to the average
variable so it is treated as a number or string appropriately and bail out with
an error message when too few parameters are passed in.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
tools/plot/graph2D.gpm
tools/plot/graph3D.gpm
tools/plot/math.gpm