gnuplot';s';步骤';样式不接受可变颜色

gnuplot';s';步骤';样式不接受可变颜色,gnuplot,Gnuplot,我在Debian 10上使用Gnuplot版本5.2 patchlevel 6。以下程序 $d << EOD 1 0.5 0.1 2 0.75 0.2 3 0.99 0.5 4 1.25 1.1 EOD plot $d using 1:2:3 w lines lc palette z lw 2 我收到一条错误消息: line 7: Too many using specs for this style 根据第II段打印样式,步骤 输入列

我在Debian 10上使用Gnuplot版本5.2 patchlevel 6。以下程序

$d << EOD
1     0.5   0.1
2     0.75  0.2
3     0.99  0.5
4     1.25  1.1
EOD
plot $d using 1:2:3 w lines lc palette z lw 2 
我收到一条错误消息:

line 7: Too many using specs for this style
根据第II段打印样式,步骤

输入列要求与打印样式线和点相同

在第二段的打印样式中,线条表示:

基本表单需要1、2或3列输入数据。其他输入列可用于提供诸如可变线颜色等信息


我做错了什么?

如果你用步骤绘制
,问题可能是:垂直线应该是什么颜色?
快速查看文档时,我找不到一个提示,即变量行颜色与步骤一起显式工作还是显式不工作

在任何情况下,都可以使用以下代码解决问题:

代码:

### plotting with steps and variable line color
reset session

$Data <<EOD
1     0.5   0.1
2     0.75  0.2
3     0.99  0.5
4     1.25  1.1
EOD

set xrange [0:5]
set yrange [0:1.5]

plot x1=y1=NaN $Data u (x0=x1,x1=$1,x0):(y0=y1,y1=$2,y0):(x1-x0):(0):3 w vectors lw 2 lc palette nohead notitle, \
     x1=y1=NaN $Data u (x0=x1,x1=$1,x1):(y0=y1,y1=$2,y0):(0):(y1-y0):3 w vectors lw 2 lc palette nohead notitle
### end of code
### plotting with steps and variable line color (vertical lines with variable color)
reset session

$Data <<EOD
1     0.5   0.1
2     0.75  0.2
3     0.99  0.5
4     1.25  1.1
EOD

set xrange [0:5]
set yrange [0:1.5]

myLevels = 20
plot x1=y1=c1=NaN $Data u (x0=x1,x1=$1,x0):(y0=y1,y1=$2,y0):(x1-x0):(0):(c0=c1,c1=$3,c0) w vectors lw 2 lc palette nohead notitle, \
     for [i=0:myLevels-1] x1=y1=NaN $Data u (x0=x1,x1=$1,x1):(y0=y1,y1=$2,y0+(y1-y0)*i/myLevels):(0):((y1-y0)/myLevels):(c0=c1,c1=$3,c0+(c1-c0)*i/myLevels) w vectors lw 2 lc palette nohead notitle, \
     $Data u 1:2:3 w p pt 7 ps 2 lc palette notitle
### end of code
结果:

### plotting with steps and variable line color
reset session

$Data <<EOD
1     0.5   0.1
2     0.75  0.2
3     0.99  0.5
4     1.25  1.1
EOD

set xrange [0:5]
set yrange [0:1.5]

plot x1=y1=NaN $Data u (x0=x1,x1=$1,x0):(y0=y1,y1=$2,y0):(x1-x0):(0):3 w vectors lw 2 lc palette nohead notitle, \
     x1=y1=NaN $Data u (x0=x1,x1=$1,x1):(y0=y1,y1=$2,y0):(0):(y1-y0):3 w vectors lw 2 lc palette nohead notitle
### end of code
### plotting with steps and variable line color (vertical lines with variable color)
reset session

$Data <<EOD
1     0.5   0.1
2     0.75  0.2
3     0.99  0.5
4     1.25  1.1
EOD

set xrange [0:5]
set yrange [0:1.5]

myLevels = 20
plot x1=y1=c1=NaN $Data u (x0=x1,x1=$1,x0):(y0=y1,y1=$2,y0):(x1-x0):(0):(c0=c1,c1=$3,c0) w vectors lw 2 lc palette nohead notitle, \
     for [i=0:myLevels-1] x1=y1=NaN $Data u (x0=x1,x1=$1,x1):(y0=y1,y1=$2,y0+(y1-y0)*i/myLevels):(0):((y1-y0)/myLevels):(c0=c1,c1=$3,c0+(c1-c0)*i/myLevels) w vectors lw 2 lc palette nohead notitle, \
     $Data u 1:2:3 w p pt 7 ps 2 lc palette notitle
### end of code

对于我的问题,这不是一个解决办法,而是一个更好的解决方案,而不是允许改变我需要的垂直线颜色的步骤!