# \donttest{
data(iris)
res.pca <- prcomp(iris[, 1:4], scale. = TRUE)
fviz_pca_ind(res.pca, habillage = iris$Species,
palette = factoextra_palette("okabe"),
ggtheme = theme_factoextra())
# or add it to an existing plot
fviz_pca_var(res.pca) + theme_factoextra()
# a consistent look across the family: pass the same ggtheme to each call
km <- kmeans(scale(iris[, 1:4]), 3)
fviz_pca_ind(res.pca, ggtheme = theme_factoextra())
fviz_cluster(km, data = iris[, 1:4], ggtheme = theme_factoextra())
# }
Run the code above in your browser using DataLab