Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't color code circles without them changing to squares & triangles #20

Closed
raynamharris opened this issue Nov 4, 2016 · 5 comments
Closed

Comments

@raynamharris
Copy link

Hi,

I love this package! But, I would like to be able to use habillage to color code my data without changing the circles to squares, triangles, and crosses. How can I do that?

Thanks,
Rayna

kassambara added a commit that referenced this issue Nov 4, 2016
@kassambara
Copy link
Owner

Hi,

I updated now factoextra on Github. A New argument pointshape has been added in fviz_pca(). When you use habillage, point shapes change automatically by groups. To avoid this behaviour use for example pointshape = 19 in combination with habillage.

Note that, now factoextra depends on ggpubr for plotting. Install the latest version on Github as follow:

# Install the latest version of factoextra
if(!require(devtools)) install.packages("devtools")
devtools::install_github("kassambara/factoextra")

# Install the latest version of ggpubr
devtools::install_github("kassambara/ggpubr")

Please try the following R code and let me know if it works for you:

library(factoextra
data(iris)
res.pca <- prcomp(iris[, -5],  scale = TRUE)
fviz_pca_ind(res.pca, habillage = iris$Species, addEllipses = TRUE, pointshape = 19)

Have a great day!!
/A

@raynamharris
Copy link
Author

That works!!

Thanks for the modification!

Rayna

On Fri, Nov 4, 2016 at 3:25 AM, Alboukadel KASSAMBARA <
notifications@github.com> wrote:

Hi,

I updated now factoextra on Github. A New argument pointshape has been
added in fviz_pca(). When you use habillage, point shapes change
automatically by groups. To avoid this behaviour use for example pointshape
= 19 in combination with habillage.

Note that, now factoextra depends on ggpubr for plotting. Install the
latest version on Github as follow:

Install the latest version of factoextraif(!require(devtools)) install.packages("devtools")devtools::install_github("kassambara/factoextra")

Install the latest version of ggpubrdevtools::install_github("kassambara/ggpubr")

Please try the following R code and let me know if it works for you:

library(factoextra
data(iris)res.pca <- prcomp(iris[, -5], scale = TRUE)
fviz_pca_ind(res.pca, habillage = iris$Species, addEllipses = TRUE, pointshape = 19)

Have a great day!!
/A


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#20 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHMdhQ5JOV6PFtVMtJxWbL-6TP01IOpeks5q6uv2gaJpZM4KpHGT
.

Rayna M. Harris
Graduate Student, Hans Hofmann Lab
​Training & Outreach Coordinator, Center for Computational Biology and
Bioinformatics

The University of Texas at Austin
http://raynamharris.github.io

@ginolhac
Copy link

ginolhac commented Feb 7, 2017

I have a small comment. The new option pointshape is very nice.
However, it seems that the bottom right part of the colored text (a) appear behind the points in the legend keys.

image

Would it be possible to set show.legend = FALSE for the geom_text()?

@kassambara
Copy link
Owner

fixed now! Please install the latest version of factoextra and use the argument show.legend.text = FALSE. It should work...

@ginolhac
Copy link

ginolhac commented Feb 7, 2017

wonderful thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants