我在fviz_pca_ind
中使用factoextra
功能
我无法实现的是设置轴标签和值的大小+图例的大小。
fviz_pca_ind(mydata.pca, repel = TRUE, alpha.ind = 1,
+ habillage = mydata_attributes$attribute1, # color by groups
+ palette = c("#00AFBB", "#E7B800"),labelsize = 5, pointsize = 1, font.family = "Arial",
+ addEllipses = TRUE # Concentration ellipse
+ )
我刚刚找到了如何设置样本和点数的大小。 有人能帮助我吗?
提前谢谢
答案 0 :(得分:0)
font.x = c(10,"plain","black"), font.y = c(10,"plain","black")
,对于轴注释尝试font.xtickslab = c(9,"plain","black"), font.ytickslab = c(9,"plain","black")
。请参见ggpar,以了解更多可以在fviz函数中调整的值ggtheme = theme(legend.title = element_text(size = 10), legend.text = element_text(size = 9))
答案 1 :(得分:0)
factoextra
库依靠ggplot2
绘制其图。因此,您可以将其附加ggplot2::theme()
函数来自定义绘图属性。在您的情况下,可能的解决方案是:
fviz_pca_ind(...) +
theme(
legend.text = element_text(size = 20),
axis.text = element_text(size = 15)
)