我正在执行以下gnuplot脚本:
set title "Efficiency scatter plot" set xlabel "perf_1" set ylabel "secondary report" set log x set log y set xrange [0.1:40.0] set yrange [0.1:40.0] set terminal png medium set output "./graph1.png" set size square set multiplot set pointsize 0.3 set style line 6 pt 6 set datafile separator "," set border 3 set xtics nomirror set ytics nomirror plot '/tmp/data.csv' using 3:1 with points pt 1 lt 3 lc var title "perf_20140113131309", \ '/tmp/data.csv' using 3:2 with points pt 1 lt 1 lc var title "perf_1" plot x notitle plot 2*x notitle plot 0.5*x notitle获取以下错误消息
"script.gnuplot", line 20: Not enough columns for variable color你可以指导我,以便找到我做错了什么。
顺便说一下,gnuplot版本是'4.6 patchlevel 3',使用的是data.csv文件
0.1,0.1,40.0 0.14,0.14,40.0 0.32,0.32,40.0 0.7,0.74,40.0提前致谢!
I am executing the following gnuplot script:
set title "Efficiency scatter plot" set xlabel "perf_1" set ylabel "secondary report" set log x set log y set xrange [0.1:40.0] set yrange [0.1:40.0] set terminal png medium set output "./graph1.png" set size square set multiplot set pointsize 0.3 set style line 6 pt 6 set datafile separator "," set border 3 set xtics nomirror set ytics nomirror plot '/tmp/data.csv' using 3:1 with points pt 1 lt 3 lc var title "perf_20140113131309", \ '/tmp/data.csv' using 3:2 with points pt 1 lt 1 lc var title "perf_1" plot x notitle plot 2*x notitle plot 0.5*x notitleobtaining the following error message
"script.gnuplot", line 20: Not enough columns for variable colorCould you please guide me in order to find what I am doing wrong.
By the way the gnuplot version is '4.6 patchlevel 3' the data.csv files used is
0.1,0.1,40.0 0.14,0.14,40.0 0.32,0.32,40.0 0.7,0.74,40.0Thanks in advance!
最满意答案
这意味着,您需要在using语句中再指定一列:第一个是x -coordinate,第二个是y -coordinate。 缺少可变线条颜色的那个。
使用例如
plot '/tmp/data.csv' using 3:1:0 with points pt 1 lt 3 lc var使用行号(第0列)作为linetype索引。 您也可以使用例如linecolor palette因此从当前定义的调色板中选择颜色。
That means, that you need to specify one more column in your using statement: The first one is the x-coordinate, the second one the y-coordinate. The one for the variable line color is missing.
Use e.g.
plot '/tmp/data.csv' using 3:1:0 with points pt 1 lt 3 lc varto use the row number (zeroth column) as linetype index. You can also use e.g. linecolor palette so select the color from the currently defined color palette.
更多推荐
发布评论