[R] Plotting labeled impulses: label collision

Johannes Graumann johannes_graumann at web.de
Fri Jan 4 20:48:36 CET 2008

Dear all,

As you can see from the attachment I'm using R to automatically annotate
peptide fragmentation mass spectra, which are represented by impulse plots.
I'd like to poll you on approaches of how to deal as generally as possible
with the two biggest annotation issues I run into:
1) very close annotated masses (impulses) with similar y-axis dimensions -
resulting in overlapping labels
2) very close annotated masses with widely differing y-axis dimensions -
resulting in the label for the smaller one partially overplotting the
impulse of the larger one

Both cases can be seen in the appended png: for 1) see x of aprox. 1100, for
2) x of aprox. 575

If one does this manually one would write the labels somewhere where there's
plenty of space and then connect them with lines to the impulses/masses
they actually represent ...

Any insight in how to make this pretty(er) automatically is highly

Thanks, Joh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Spectrum.png
Type: image/png
Size: 17832 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080104/9612023d/attachment-0002.png 

More information about the R-help mailing list