我正在执行以下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
提前致谢!
解决方法:
这意味着,您需要在using语句中再指定一列:第一个是x坐标,第二个是y坐标.缺少可变线条颜色的那个.
使用例如
plot '/tmp/data.csv' using 3:1:0 with points pt 1 lt 3 lc var
使用行号(第0列)作为线型索引.您也可以使用例如线条颜色调色板,因此从当前定义的调色板中选择颜色.