gnuplot:没有足够的列用于可变颜色 [英] gnuplot: Not enough columns for variable color

查看:82
本文介绍了gnuplot:没有足够的列用于可变颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在执行以下gnuplot脚本:

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 notitle

获得以下错误消息

 "script.gnuplot", line 20: Not enough columns for variable color

能不能请我指导以找出我在做错什么.

Could you please guide me in order to find what I am doing wrong.

通过gnuplot版本为"4.6 patchlevel 3"的方式,使用的data.csv文件为

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.0

提前谢谢!

推荐答案

这意味着您需要在using语句中再指定一列:第一个是x坐标,第二个是y-坐标.缺少用于可变线条颜色的一个.

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.

使用例如

plot '/tmp/data.csv' using 3:1:0 with points pt 1 lt 3 lc var

使用行号(第零列)作为linetype索引.您也可以使用linecolor palette,因此从当前定义的调色板中选择颜色.

to 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.

这篇关于gnuplot:没有足够的列用于可变颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆