GNUPlot向散点图添加标签

时间:2014-08-24 17:42:08

标签: 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 (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列显示为某些点(不是全部)的标签? 这个链接:http://newsgroups.derkeiler.com/Archive/Comp/comp.graphics.apps.gnuplot/2008-02/msg00094.html说这很难(几乎不可能)

1 个答案:

答案 0 :(得分:0)

我迷失在所有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

“set rmargin”是必要的,因此标签不会在屏幕边缘运行。

感谢你的帮助Christoph。当我试图把“使用带有yerrorbars的标签”时,我很困惑,这是GNUPlot不喜欢的。