为散点图添加标签



我正在用perl脚本一次制作几个图形,该脚本运行gnuplot并输出png图像。

我的数据如下:

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 low error, point label。

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说这是非常困难的(几乎不可能)

我迷失在所有的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,谢谢你的帮助。当我试图把GNUPlot不喜欢的"使用带有yerrorbars的标签"时,我感到困惑。

最新更新