Jeffrey.Morris at sanofipasteur.com
2010-Aug-19 14:31 UTC
[R] Adding lines to xyplot with abline
Is it kosher to add, say, horizontal lines to a lattice xyplot using abline(h=xxx)? The lines don't appear at the right value, that is, if h=150, the line might appear at h=140? Jeff This communication, including any attachments, is intended solely for the use of the addressee and may contain information which is privileged, confidential, exempt from disclosure under applicable law or subject to copyright. If you are not an intended recipient, any use, disclosure, distribution, reproduction, review or copying is unauthorized and may be unlawful. If you have received this transmission in error, please notify the sender immediately. Thank you. Cette communication,y compris les pieces jointes, est reservee a l'usage exclusif du destinataire et peut contenir des informations privilegiees, confidentielles, exemptees de divulgation selon la loi ou protegees par les droits de publication. Si vous n'etes pas un destinataire, toute utilisation, divulgation, distribution, reproduction, examen ou copie est non-autorisee et peut etre illegale. Si vous avez recu cette communication par erreur, veuillez aviser l'expediteur immediatement. Merci. [[alternative HTML version deleted]]
On Aug 19, 2010, at 10:31 AM, <Jeffrey.Morris at sanofipasteur.com> wrote:> Is it kosher to add, say, horizontal lines to a lattice xyplot using > abline(h=xxx)? The lines don't appear at the right value, that is, if > h=150, the line might appear at h=140?Correct. The coordinate systems are not shared between lattice and base graphics. ?panel.abline If you have an existing plot on your screen device, you can try what the help pages describe as an experimental method: trellis.focus("panel", 1, 1) panel.abline(h=140) trellis.unfocus() As far as I can tell, it doesn't actually change the lattice object but the plot can be saved as whatever options for "Save as" your GUI may offer. -- David Winsemius, MD West Hartford, CT