【问题标题】:How can I avoid variables and individuals overlapping in a biplot?如何避免变量和个体在双图中重叠?
【发布时间】:2021-08-15 01:46:04
【问题描述】:

我不知道如何避免箭头将个人隐藏在我的 PCA 中

我已经使用了repel功能如下:

fviz_pca_biplot(res.pca, repel = TRUE,
                col.var = "#2E9FDF",
                col.ind = "#696969")

谢谢

【问题讨论】:

  • 您的问题与 RStudio 标签无关。请不要使用它,除非它专门用于 IDE。

标签: r pca


【解决方案1】:

您可以通过使用渐变颜色来最小化效果。

library(FactoMineR)
library(factoextra)
data(decathlon)

res.pca = PCA(decathlon[,1:12], scale.unit=TRUE, ncp=5, quanti.sup=c(11: 12), graph=T)

fviz_pca_biplot(res.pca, repel = TRUE, col.ind = "cos2",
                gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
                col.var = "#2E9FDF")

【讨论】:

    猜你喜欢
    • 2022-10-20
    • 2023-04-06
    • 2012-11-18
    • 1970-01-01
    • 2011-12-11
    • 2021-07-14
    • 2019-11-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多