I am running a PCA in R and ploting the results using fviz
functions from Factoextra
package. I want to change legend attributes like title and values using this code
acp<-PCA(params_alpha, scale.unit = TRUE, ncp=5, quali.sup=c(1,2))
plot1<-fviz_pca_biplot(acp, geom=c("point"), pointsize=1, col.var="black", axes=c(1,2), habillage=2)+
theme(legend.text = element_text("Lobulo"))
I have two main problems here: first, when I run the code I get this error:
In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font family not found in Windows font database
I tried to solve it using this post Can't change fonts in ggplot/geom_text but it was not effective. The other problem about this code is that legend attributes have not changed at all.
I just want to change legend title and values but I don't know how. I´d be so grateful if you can help me.