我正在 gnuplot 的帮助下从 csv 文件读取数据。大多数线有 8 列,其中一些有 9 列。每当有 9 列时,我想画一条垂直线(考虑标记该位置)。我可以用 gnuplot 实现这一点吗?
最佳答案
您可以使用(假设我在 x 轴上的点是 0.35,并且我想要整个 y 轴):
set arrow from 0.35,graph(0,0) to 0.35,graph(1,1) nohead
或者,如果您想在特定的 y 范围{ymin,ymax} 中显示此内容
set arrow from 0.35,ymin to 0.35,ymax nohead
如果您想自定义更多内容,可以使用:
set style arrow {idx:index} default
set style arrow {idx:index} [ nohead | head | backhead | heads ]
[ size {flt:length} [,{flt:angle}]
[,{flt:backangle}] ]
[ filled | empty | nofilled ]
[ front | back ]
[ [ linetype | lt {idx:type} ]
[ linewidth | lw {int:width} ]
| [ linestyle | ls {idx:style} ] ]
有关 gnuplot 运行的更多信息:
help arrow
关于Gnuplot:特定位置的垂直线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4499998/