Question: Setting the label and value size for axis in PCA plot with fviz_pca_ind in factoextra
0
gravatar for lessismore
9 months ago by
lessismore560
Mexico
lessismore560 wrote:

Dear all,

im using fviz_pca_ind function in factoextra R package.

What i cannot accomplish is to set the size of the axis labels and values + the size of the legend

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
+ )

i just found how to set the size of my samples and the points. Could somebody help me?

thank you in advance

factoextra pca R • 1.4k views
ADD COMMENTlink modified 9 months ago by Kevin Blighe35k • written 9 months ago by lessismore560
3
gravatar for Kevin Blighe
9 months ago by
Kevin Blighe35k
Republic of Ireland
Kevin Blighe35k wrote:

Make use of the ggtheme parameter that can be passed to the fviz functions. Specifically try this as a parameter:

frizz_pca_ind(..., ggtheme=theme(axis.text=element_text(size=10), axis.title=element_text(size=16, face="bold")), ...)

Also take a look at the other theme functions. For example, for legend, use parameters like legend.title and legend.text

Take a further look here as an example: Boxplot in ggplot2

There is a page here briefly describing this: http://www.sthda.com/english/rpkgs/factoextra/reference/fviz_pca.html

fviz is just a wrapper for ggplot2, so, all functions should be compatible.

Kevin

ADD COMMENTlink modified 9 months ago • written 9 months ago by Kevin Blighe35k

Kevin you're always crucial. Could you explain what you said?

fviz is just a wrapper for ggplot2, so, all functions should be compatible

ADD REPLYlink written 9 months ago by lessismore560
1

The fviz functions, as far as I understand, just use ggplot2 code 'behind the scenes', as we say in English. In particular, ggplot2 themes can be used via the ggtheme parameter of fviz.

ADD REPLYlink written 9 months ago by Kevin Blighe35k
1

Very clear! thanks a lot

ADD REPLYlink written 9 months ago by lessismore560

De nada - nos vemos

ADD REPLYlink written 9 months ago by Kevin Blighe35k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2306 users visited in the last hour