'Changing the points shape in fviz_pca_biplot
I am plotting my PCA as a biplot with
fviz_pca_biplot
but I cannot change my points to squares (pch=15).
For single group of observations I use the code as below
basic_bi_plot <- fviz_pca_biplot(res.pca, axes = c(1, 2),
pointsize = 3,
addEllipses = FALSE, label = "var", labelsize = 10,
col.var="contrib",
gradient.cols = c("grey75", "blue", "red"),
repel = TRUE, ellipse.level=0.95)
basic_bi_plot
try_bi.plot <- basic_bi_plot +
My_Theme +
scale_shape_manual(values=c(15))
but the
scale_shape_manual(values=c(15))
is not changing anything and I keep getting the default circles.
Solution 1:[1]
You might have figured it out by now but in case it can help someone else, try adding point = 15
in your fviz_pca_biplot
function. It worked on my data.
fviz_pca_biplot(pca, axes = c(1, 2),pointsize = 3,point = 15,label = "var)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ena |