[R] discerning plot dots using colors
Peter Langfelder
peter.langfelder at gmail.com
Wed Oct 27 00:42:22 CEST 2010
On Tue, Oct 26, 2010 at 3:13 PM, Daisy Englert Duursma
<daisy.duursma at gmail.com> wrote:
> There are several ways to do this but the package ggplot2
>
> library(ggplot2)
> qplot(displ,hwy,data=mpg,colour=factor(cyl))
>
>
That can of course be done also using the standard plot command
(substitute variable names as necessary):
x = elevation
y = richness
color = as.numeric(as.factor(adminArea))
plot(x,y, col = color, bg = color)
Peter
More information about the R-help
mailing list