Question: Setting the label and value size for axis in PCA plot with fviz_pca_ind in factoextra
0
gravatar for lessismore
3 months ago by
lessismore490
Mexico
lessismore490 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 • 417 views
ADD COMMENTlink modified 3 months ago by Kevin Blighe24k • written 3 months ago by lessismore490
3
gravatar for Kevin Blighe
3 months ago by
Kevin Blighe24k
Republic of Ireland
Kevin Blighe24k 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 3 months ago • written 3 months ago by Kevin Blighe24k

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 3 months ago by lessismore490
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 3 months ago by Kevin Blighe24k
1

Very clear! thanks a lot

ADD REPLYlink written 3 months ago by lessismore490

De nada - nos vemos

ADD REPLYlink written 3 months ago by Kevin Blighe24k
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: 706 users visited in the last hour