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

标签 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

绘制这个: enter image description here

水平线位于-13。

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

plot [5:20][] pot_t(x) t "up"  w lines ls 1

enter image description here 水平线箭头标签仍然存在。

如何删除标签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

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

关于gnuplot - 如何删除脚本中下一个绘图的标签和箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50270580/

相关文章:

C++:如何将数据输出到多个.dat 文件?

output - 如何以全屏和特定大小打开 gnuplot?

linux - 如何在 gnuplot 图中的每一点画一个圆圈?

Gnuplot - 如何获得没有意义的图形? (我只想有轴、标题以及 x 和 y 标签)

gnuplot - 忽略远离平均 gnuplot 的点

time - Gnuplot 使用部分日期列/除以天数

Gnuplot 线性拟合 f(x) = a*x

ubuntu - 为什么 gnuplot 4.6 绘图窗口没有 Gnuplot 4.4 的功能?

c++ - 将 GNUPLOT 与 Visual Studio 结合使用

gnuplot - 在 gnuplot 中更改 x 值