Message-ID: <9319AEBE-026E-46A0-9F93-FD31447B8124@comcast.net>
Date: 2011-06-22T14:43:12Z
From: David Winsemius
Subject: How to add label to lines()
In-Reply-To: <4E00AB37.9060205@monash.edu>
On Jun 21, 2011, at 10:31 AM, Nevil Amos wrote:
> I am plotting a number of lines on a standard plot. I would like to
> add labels at the end (rhs) of each line. is there a way to do this
> other than defining the individual xy coordinates and placing each
> label using text()
Without an example it is difficult to know if your coding is
efficient. The text fn is vectorized, so there may be a one-liner that
does what you could be currently doing piecemeal.
plot(1,1)
for( b in 1-(1:5)/20) abline(a=0,b=b)
text(1.4, 1.4*(1-(1:5)/20), as.character(1-(1:5)/20) )
--
David Winsemius, MD
West Hartford, CT