-
Notifications
You must be signed in to change notification settings - Fork 49
Description
I got the following error from CastaliaPlot
gnuplot> set key title "TXpower,beaconFraction" 1,0.9
line 0: unknown key option
After some googling I found out that this happens because of changes in gnuplot. It requires an "at" before the coordinates in order to recognize the coordinates.
The solution is to modify line 387 of CastaliaPlot.
That line looks like this:
if ltitle != "": key += "title "" + ltitle + "" "
and you should change it to this:
if ltitle != "": key += "title "" + ltitle + "" at "
This worked for me.
My environment is omnetpp 4.4.1, akaroa 2.7.11, castalia downloaded from http://castalia.research.nicta.com.au/index.php/en/download (which I assume it is the latest version, even though the version file within says that is version 3.0).
The gnuplot version is 4.4 patch 3; this is the version that comes with my ubuntu 12.04.4 LTS installation. FYI, this version of gnuplot was released on 1.03.2011.
As far as I could see from the gnuplot documentation, this "new" syntax is pr Juesent since version 4.4. There were no backward compatibility references whatsoever.
P.S. Just found out that this breaks the other functionality where you provide the relative legend position by keywords like "left", in my case:
CastaliaResults -i 140325-135747.txt -s got | CastaliaPlot -o valueProp-1seed.png -s histogram --invert -l left
Update:
Replacing line 388 with this:
if options.legend: key += "at " + options.legend if options.legend[0].isdigit() else options.legend
will solve the broken keywords. The backward compatibility issue remains though.