[R] colour coded points in biplot

Petr PIKAL petr.pikal at precheza.cz
Thu Dec 6 10:52:18 CET 2007

Dear all

I tried to make a biplot with color coded labels but I was not successful. 
Searching archives I found that it is probably not so simple.
I found

which recommends eqscplot

eqscplot(fit$score[,1], fit$score[,2], pch = 20, col=c(rep(2,10), 
rep(3,40)), cex=2)


or I can use plot itself, but then I was not able to find how to add 

The closest I get is

fit<-(princomp(USArrests, cor = TRUE))
biplot(fit , xlabs=rep("", 50))
points(fit$score[,1], fit$score[,2], pch = 20, col=c(rep(2,10), 
rep(3,40)), cex=2)

and use some suitable scaling before calling points. 

My question is if there is some other easier approach to get color coded 
points in biplot?

Petr Pikal
petr.pikal at precheza.cz

More information about the R-help mailing list