我有以下 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)
如何删除标签threshold和水平虚线?
问候
标签和箭头会保留在每个后续绘图中,直到您显式删除它们为止,就像几乎所有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在上面的示例中)。