[R] color ranges on a 2D plot

dxc13 dxc13 at health.state.ny.us
Wed Jan 16 21:35:06 CET 2008


useR's

I am trying to color the points on a scatter plot (code below) with two
colors.  Red for values 0.5 -1.0 and blue for 0.0 - .49.  Does anyone know a
easy way to do this?

x <- runif(100, 0, 1)
y <- runif(100, 0, 1)
plot(y ~ x, pch=16)

Thanks,
dxc13
-- 
View this message in context: http://www.nabble.com/color-ranges-on-a-2D-plot-tp14893457p14893457.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list