Skip to content

Pca loading plot lables

3 messages · Frédéric Ooms, Jari Oksanen, Bjørn-Helge Mevik

#
On Mon, 2005-04-25 at 13:21 +0200, Fr??d??ric Ooms wrote:
Have you tried 'biplot' and found it unsatisfactory for your needs? 

biplot(pr)

Alternatively, you can do it by hand:

plot(pr$loadings, type="n")
text(pr$loadings, rownames(pr$loadings), xpd=TRUE)
abline(h=0); abline(v=0)

If you really want to have Axis 2 as horizontal, then you must replace
all pr$loadings pieces with pr$loadings[,2:1]. 

cheers, jari oksanen
#
One way is to use the loadingplot() function in the package `pls':

molprop.pc <- princomp(whatever)

library(pls)
loadingplot(molprop.pc, scatter = TRUE, labels = "names")

(If you want comp 2 vs. comp 1:
loadingplot(molprop.pc, comps = 2:1, scatter = TRUE, labels = "names")