How can I make PCA vector arrows bold (wider)?

Viewed 151

When I save PCA plot, vector rows looks thinner especially when I paste in word file, is there any way to bold the vector rows to make good for reader?

here is the dummy example,

library("FactoMineR")
library("factoextra")
decathlon2.active <- decathlon2[1:23, 1:10]
res.pca <- PCA(decathlon2.active, graph = FALSE)

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

enter image description here

1 Answers

It calls fviz underneath, and there is a parameter arrowsize, so I guess you can try it and see whether it is what you need:

library(patchwork)

p1 = fviz_pca_biplot(res.pca, repel = TRUE,
                 col.var = "#2E9FDF", # Variables color
                 col.ind = "#696969",  # Individuals color,
                arrowsize = 0.5
) + ggtitle("size = 0.5")

p2 = fviz_pca_biplot(res.pca, repel = TRUE,
                 col.var = "#2E9FDF", # Variables color
                 col.ind = "#696969",  # Individuals color,
                arrowsize = 1
) + ggtitle("size = 1")


p3 = fviz_pca_biplot(res.pca, repel = TRUE,
                 col.var = "#2E9FDF", # Variables color
                 col.ind = "#696969",  # Individuals color,
                arrowsize = 2
) + ggtitle("size = 2")

enter image description here

Related