gnuplot点颜色错误
在此示例中,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
In this example, the point color(blue) of the 3. plot differs from the test output(green) - why is that? (my default terminal is aqua, but it is the same with e.g. 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
by changing the order of the plots, the color changes:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SourceForge 上的用户 sfeam 提供了答案:
显然,线条图的颜色是由前面的线条数设置的
绘图,而点图的颜色由所有先前的数量设置
地块。
两者都可以通过 linecolor 或 lc 控制。
User sfeam on SourceForge provides the answer:
Apparently the color of lines plot is set by the number of previous lines
plots, while the color of points plot is set by the number of all previous
plots.
Both can be controlled by linecolor or lc.