gnuplot点颜色错误

时间:2011-10-31 00:41:46

标签: colors gnuplot point

在此示例中,3.绘图的点颜色(蓝色)与测试输出(绿色)不同 - 为什么? (我的默认终端是aqua,但它与例如png相同)

plot [0:4]\
     '-' title 'pt1' with points pt 1,\
     2*x title 'lt1' with lines  lt 1,\
     '-' title 'pt2' with points pt 2,\
     3*x title 'lt2' with lines  lt 2
     1  1
     2  5
     end
     1  3
     3  7
     end

通过更改绘图的顺序,颜色会发生变化:

plot [0:4]\
     '-' title 'pt1' with points pt 1,\
     '-' title 'pt2' with points pt 2,\
     2*x title 'lt1' with lines  lt 1,\
     3*x title 'lt2' with lines  lt 2
     1  1
     2  5
     end
     1  3
     3  7
     end

1 个答案:

答案 0 :(得分:1)

SourceForge上的用户sfeam提供了答案:

  

点类型不控制颜色。这是第三个情节,你有   没有指示,所以它得到线型3(蓝色)的颜色。

显然,线条图的颜色是由前一行的数量设定的 情节,而点图的颜色由以前的所有数字设定 地块。 两者都可以通过linecolor或lc控制。