如何删除脚本中下一个绘图的标签和箭头

pab*_*blo 2 gnuplot

我有以下 Gnuplot 脚本:

set label "Threshold"  at first  1.03, first  -15
set arrow from graph 0,first -13 to graph 1, first -13 nohead lt 0 lw 5 

plot [1:12][] pot_t(x) t "up"  w lines ls 1
Run Code Online (Sandbox Code Playgroud)

绘制这个: 在此输入图像描述

水平线位于-13。

如果我在脚本中添加第二个情节

plot [5:20][] pot_t(x) t "up"  w lines ls 1
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述 水平线arrow仍然label在那里。

如何删除标签threshold和水平虚线?

问候

Kar*_*arl 5

标签和箭头会保留在每个后续绘图中,直到您显式删除它们为止,就像几乎所有gnuplot 设置一样。

show label您可以使用/找出它们各自的标识符号,show arrow并通过 删除它们unset

set label 5 at 1,1 "Labeltext" # Explicitly give the label an id number
plot x   # Here's a label
unset label 5
plot x   # And it's gone
Run Code Online (Sandbox Code Playgroud)

您可以通过给箭头和标签提供 ID 号来跟踪它们(5在上面的示例中)。