Gnuplot:特定位置的垂直线

Her*_*r K 5 gnuplot

我在gnuplot的帮助下从csv文件中读取数据.大多数行有8列,其中一些有9列.每当有9列时,我想绘制一条垂直线(想想标记该位置).我能用gnuplot实现吗?

谢谢.

Bru*_*ior 31

你可以使用(并假设我在x轴上的点是0.35,我想要整个y轴):

set arrow from 0.35,graph(0,0) to 0.35,graph(1,1) nohead
Run Code Online (Sandbox Code Playgroud)

或者,如果你想在特定的y范围内显示它{ymin,ymax}

set arrow from 0.35,ymin to 0.35,ymax nohead
Run Code Online (Sandbox Code Playgroud)

如果您想要自定义更多,您可以使用:

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} ] ] 
Run Code Online (Sandbox Code Playgroud)

有关gnuplot运行内的更多信息:

help arrow
Run Code Online (Sandbox Code Playgroud)

  • 有什么方法可以自动获得ymax/ymin吗? (5认同)

Bor*_*ile -9

只需通过设置 yrange 来固定比例:

set yrange [##:##]

其中##是某个数字的占位符:)

干杯,
B2S