[R] scatter plot question
Mark Lyman
mark.lyman at atk.com
Tue Mar 3 23:22:47 CET 2009
Dipankar Basu <basu.15 <at> gmail.com> writes:
>
> Hi R Users,
>
> I have a dataframe like this:
>
> id x rho
> A 1 0.1
> B 20 0.5
> C 2 0.9
> ...
>
> I want to do a scatter plot of "x" versus "rho" but for each point on the
> scatter plot I want the corresponding entry for "id" instead of points.
test <- data.frame(id=c("A", "B", "C"), x=c(1, 20, 2), rho=c(0.1, 0.5, 0.9))
plot(rho~x, test, pch=as.character(id))
Mark Lyman
More information about the R-help
mailing list