[英]how to make a biplot without label in R
I used 我用了
biplot(prcomp(data, scale.=T), xlabs=rep("·", nrow(data)))
but it did not work to omit the labels. 但是忽略标签是行不通的。 Even if I remove the labels my plot is so messy and ugly which can be seen below!
即使我删除标签,我的情节也是如此凌乱和丑陋,如下所示! I also need to show the percentage of PCs on axes
我还需要显示PC在轴上的百分比
I used the following command to plot the image 我使用以下命令来绘制图像
biplot(prcomp(data, scale.=T), xlabs=rep("·", nrow(data)), ylabs = rep("·", ncol(data)))
Try this one 试试这个
\devtools::install_github("sinhrks/ggfortify")
library(ggfortify)
ggplot2::autoplot(stats::prcomp(USArrests, scale=TRUE), label = FALSE, loadings.label = TRUE)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.