Question: I would like to delete a legend in PCA in R
0
gravatar for junghyunshim
10 months ago by
junghyunshim0 wrote:

I used script below to draw a PCA. In order to increase the points, I added size=0 in geom_point(). But in the figure, there is a legend size. How can I remove the legend? Thanks.

ggplot(degree121, aes(PC1, PC2, col=Classification, fill=Classification, group=Classification))+ stat_ellipse(geom="polygon", alpha=0.1) + geom_point(aes(shape=Classification, color=Classification, size=0))+ theme_bw()+ scale_color_manual(values = c("red","green","blue"))

R • 237 views
ADD COMMENTlink modified 10 months ago by jared.andrews074.3k • written 10 months ago by junghyunshim0
1
gravatar for jared.andrews07
10 months ago by
jared.andrews074.3k
St. Louis, MO
jared.andrews074.3k wrote:

Add + theme(legend.position = "none").

Questions for common packages like ggplot can almost always be answered via Google rather than posting here.

ADD COMMENTlink written 10 months ago by jared.andrews074.3k
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: 1580 users visited in the last hour