Linux gnuplot:没有足够的列用于可变颜色
我正在执行以下gnuplot脚本:Linux gnuplot:没有足够的列用于可变颜色,linux,runtime-error,gnuplot,Linux,Runtime Error,Gnuplot,我正在执行以下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 se
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
提前谢谢 这意味着您需要使用语句在
中再指定一列:第一列是x
-坐标,第二列是y
-坐标。缺少用于可变线颜色的线
使用例如
plot '/tmp/data.csv' using 3:1:0 with points pt 1 lt 3 lc var
使用行号(第零列)作为线型
索引。您也可以使用例如linecolor palette
从当前定义的调色板中选择颜色。顺便说一句,您不应该使用那样的multiplot
模式。为什么不用一个plot
命令来绘制所有内容<代码>绘图'/tmp/data.csv',x notitle,2*x notitle,0.5*x notitle
。并使用pngcairo
而不是png
:)对不起,我不太了解,但你能告诉我(或发送链接)png和pngcairo之间的区别吗。关于第一点,你是对的,我可以照你说的做,我将修改我的脚本。谢谢在我看来,pngcairo
终端的主要优点是线条和字体呈现的质量更高。您好,谢谢,它工作得很好!即使它没有生成我所期望的图形,它还是成功了。现在问题与数据有关。再次感谢!你希望得到什么样的图表?答案只是给出一个可行的例子。你需要一个特定的颜色编码吗?重点是我正在用N个文件的结果构建一个散点图,从这些N个文件中,我需要比较一个和一个,以便根据我收到的规范获得预期的结果。但我一直都在尝试,然后你可以尝试迭代,比如filelist=“file1file2file3”;[i=1:words(filelist)]word(filelist,i)lt i
或类似内容的绘图。