The sample in a document gnuplot.doc may be incorrect for figure_spiderplot.
I think the last line
plot for [i=1:5] $DATA using i:key(1)
shoud be
plot for [i=2:6] $DATA every ::1 using i:key(1)
, or
set datafile columnheaders
plot for [i=2:6] $DATA using i:key(1)
In fact, the script plotstyles.gnu uses the latter one.
Moreover, spiderplot may make null line in key box for the plot title.
For example, in the same sample above, I modified the last line to
set key box
plot for [i=2:6] $DATA using i:key(1) title columnheader
Then the result is attached file. The keybox includes null lines
corresponding plot titles.
This was a weird one. The problem was actually in creation of the previous figure in the demo. The spiderplot key is incorrect because the previous plot command used data from
'+', and the internal flag indicating use of pseudodata was not properly reset. Fixed now (and fix back-ported to version 5.4.9).The Bug #2648 is not fixed in the current version (git 6.1, and
gnuplot-6.0.2).
(1) The sample in current help document may not be correct.
Gnuplot says
line 14: warning: Skipping data file with no valid points
The last "plot" line should be
Then gnuplot draw the graph correctly, but the key appear only for
"George" (see spiderplot1.png with "set key box").
(2) To make the axis label, we can use "title columnheader". But
blank keys are made for spiderplot.
See spiderplot2.png. The blank key prevens to make correct keys by
keyentrys. Can we remove blank keys for them in the case using
"title columnheader" ?
spiderplot2.png
Sorry, the problem (1) was solved in my first report. Please modify gnuplot.doc to add the line
set datafile columnheaders
and from "[i=1:5]" to "[i=2:6]".
I don't know how to fix the problem (2).
I did some tests. I modified the function find_maxl_keys() in boundary.c from
L1175 ; /* Nothing */to
L1175 continue;Then, commands
(1) plot for [i=2:6] $DATA using i:key(1)(2) plot for [i=2:6] $DATA using i title columnheader(i-1)(3) plot for [i=2:6] $DATA using i title columnheader(i-1), keyentry with l lt 1 title "George", keyentry with l lt 2 title "Harriet"make good results and no blank line appears in the key. But, for the command
(4) plot for [i=2:6] $DATA using i:key(1) title columnheader(i-1)the key may not be correct (spiderplot3.png).
Thank you for the report and the analysis.
I will correct the example script in the documentation.
The use of "title" does not work for this type of plot. That is exactly why "key" is provided as an alternative.
Thank you for the response.
I think it is not bad feature that axis labels of spiderplot are taken from columnheader strings of data, and now we can use it in the current version of spiderplot by "title columnheader()".
If it is not appropriate the keyword name "title" for spiderplot, can we use another new name to label axises by columnheader strings for spiderplot (and for parallelplot) ?
I fixed the bug the using "title" in a spiderplot produced an extra blank line in the plot key.
Thanks. That woks.