I performed a PCA analysis (on Iris data) using the R prcomp package. When I am plotting the results using the ggbiplot function, the scale of the axes is according to the rotated data (= ir_pca$x) (see picture link below), but I want the axes scales according to the loadings (= ir_pca$rotation) as well. Two plots would be nice. One with the loadings and the corresponding axes scaling and one extra plot displaying only the rotated data and its corresponding axes scales. A third option would be to display both scales in one plot, i.e., rotated data on the bottom and left side and the loadings scales on the topmost and right side.
ir_pca <- prcomp(ir, center=TRUE, scale=TRUE)
g = ggbiplot(
ir_pca,
choices=c(1, 2),
groups=iris[, 5],
var.axes=TRUE,
obs.scale=1,
ellipse=TRUE
)
print(g)
Result of the PCA (Iris data) analysis displaying only the rotated data on the scaling axes.