简体   繁体   English

如何在R中制作没有标签的双图

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM