Skip to content
Prev 155116 / 398503 Next

Use of colour in plots

Hi

r-help-bounces at r-project.org napsal dne 05.09.2008 16:24:35:
Or

third <- (z$y >=.5)+1
plot(z, col=third, pch=16)

Just tell to col a vector of colors with appropriate use of logical.

Or you can use col = as.numeric(some factor), which is quite convenient 
use of factors feature which is not desired in other cases.
See warning section of factor help page.

Regards
http://www.R-project.org/posting-guide.html