我想删除图例的第二部分,但保留图中的颜色。我的代码如下(任何帮助非常感谢):
nmds.gplot<-ggplot(nmds2,aes(x=nmds1,y=nmds2))
nmds.gplot + aes(shape=factor(yr)) +
geom_point (aes(colour=factor(Trt)),size=4) +
theme_bw() +
theme(panel.grid.major=element_blank(),panel.grid.minor=element_blank()) +
scale_x_continuous(name="NMDS Axis 1") +
scale_y_continuous(name="NMDS Axis 2") +
theme(axis.title.x = element_text(size=16)) +
theme (axis.title.y=element_text(size=16)) +
theme (axis.text.y = element_text(size=14)) +
theme (axis.text.x = element_text(size=14)) +
geom_vline (xintercept=0, linetype = "dotted") +
geom_hline (xintercept=0, linetype = "dotted")