Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GNUPlot向散点图添加标签_Gnuplot - Fatal编程技术网

GNUPlot向散点图添加标签

GNUPlot向散点图添加标签,gnuplot,Gnuplot,我用一个运行gnuplot并输出png图像的perl脚本一次绘制了几个图形 我的数据如下所示: 3.57 3.13 2.88 3.38 A1H1'-A1H8 4.95 4.53 4.17 4.89 3.91 3.37 3.11 3.64 3.98 4.22 3.88 4.55 A1H2'-A2H1' ... 列包括x、y、y低错误和点标签 GNUPlot输入为: set xlabel 'X-Ray Distance (Angstrom)' set ylabel 'NOESY Distance

我用一个运行gnuplot并输出png图像的perl脚本一次绘制了几个图形

我的数据如下所示:

3.57 3.13 2.88 3.38 A1H1'-A1H8
4.95 4.53 4.17 4.89
3.91 3.37 3.11 3.64
3.98 4.22 3.88 4.55 A1H2'-A2H1'
...
列包括x、y、y低错误和点标签

GNUPlot输入为:

set xlabel 'X-Ray Distance (Angstrom)'
set ylabel 'NOESY Distance (Angstrom)'
set title 'r(AAAA) A-Form Correlation'
set terminal png size 1200, 900
set xrange[2:9]
set yrange[2:9]
set output 'correlation_AAAA.png'
plot x title 'NMR = X-Ray', \
     'correlation_AAAA.dat' title 'NMR' with yerrorbars
我的问题是,如何让第5列显示为某些点(不是所有点)的标签?
这个链接:说这很难(几乎不可能)

我在所有的GNUPlot文档中都迷路了。我自己的错

以下是最低限度的工作解决方案:

set label " A4H8-A3H3'" at 7.42, 2.98
set rmargin at screen 0.92
plot x title 'NMR = X-Ray', \
 'correlation_AAAA.dat' title 'NMR' with yerrorbars
 pause -1
“设置rmargin”是必需的,这样标签就不会从屏幕边缘溢出


谢谢你的帮助,克里斯托夫。当我试图把GNUPlot不喜欢的“使用带有yerrorbars的标签”放进去时,我感到困惑。

你读过你链接的消息了吗?似乎不是这样,因为它告诉您如何在点下方放置标签;)好的,如果您想从数据文件中读取标签,可以使用
标签
打印样式,这就是我的意思:):
使用yerrorbars打印“correlation_AAAA.dat”,使用1:2:5打印标签