gnuplot - 在 gnuplot 中设置箭头的标题

标签 gnuplot

我用箭头画了一条垂直线,我想给它加上标题,以便它显示在键中。有办法吗?就手册而言,arrow 的语法中没有 title 选项,但我确信有解决方法。

我唯一想到的是用与绘图范围外的东西相同的颜色绘制箭头并使用它的标题,但它相当笨拙。

我正在使用终端 pngcairo,以防万一。

最佳答案

您可以绘制一些带有向量的东西,这将在键中给出一个title。它根据数据点绘制箭头。 using 语句是 x:yxy 其中尾部位于 (x, y),头部位于 (xx, yy)。对于垂直线,您可以关闭箭头并使用零的 Δx:

set terminal pngcairo dashed
set output 'plot.png'

set angles degrees
set xrange [0:360]
set yrange [-2:2]

plot sin(x), '-' using 1:(-2):(0):(4) with vectors nohead lc rgb 'black' title '90 degrees'
90
e

Result of gnuplot script

关于gnuplot - 在 gnuplot 中设置箭头的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35685160/

相关文章:

pdf - gnuplot - pdf 终端 - 设置 unicode 字符(太阳质量符号/odot)

scripting - GNUPLOT:点图数据取决于点的大小

gnuplot - 使用 GNUPlot 生成堆积条形图

gnuplot - 在 Gnuplot 4.0 中选择线型和颜色

linux - gnuplot 中缩写日的问题

plot - 如何在 gnuplot 中使标签和标题加粗?

graphics - 带误差线的 Gnuplot 直方图

linux - Gnuplot 条形图对齐

c++ - 在C++中运行system()时收到gnuplot错误

c++ - Gnuplot - 每秒更新图表