[R] How to display data values for points in a plot?
Erik Iverson
eriki at ccbr.umn.edu
Thu May 13 20:58:05 CEST 2010
Nish wrote:
> Hello,
>
> I would like to know how to display values for points in a plot funtion. For
> example,
>
> plot( y=dat$a,
> x=dat$b,
> main="plot1",
> ylab="a",
> xlab="b",
> ylim=c(-10, 10),
> xlim=c(-10, 10),
> type = "p",
> pch=17,
> col=<vector of colors depending on the value of "b">,
> cex=1.5
> )
>
> How can I add a label to each of points here, if I have a list of values
> associated with the point.
>
Please provide self-contained, reproducible code.
Maybe ?text is what you want?
More information about the R-help
mailing list