[R] unable to interactively label curves on a plot
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Sat Oct 20 18:20:53 CEST 2007
Quin Wills wrote:
> Hello all
>
> Simple question for the gurus. I'm trying to interactively label curves
> on a single plot. The labcurve() function from Hmisc seems like the way
> to do this (?). I just can't seem to get it to work. Toy example:
>
> > x <- 1:10
> > y1 <- x^2
> > y2 <- 2*x
> > plot(x,y1)
> > lines(x,y2)
> > labcurve(labels=c("curve1", "curve2"), method="locator")
>
> From the help file, this is how I would understand it should be done,
> but have tried many other combinations, with no luck.
>
> Running up-to-date R, R packages and Fedora.
>
> Many thanks,
> Quin
>
Please take time to read the help file for labcurve which makes it clear
that you need to give it the data as well as the curve labels. Also
specify pl=TRUE.
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list