I have two unequal length legend of colour and shape, how can I merge them into a single legend?
x<-rep(1:5,6)
y<-c(1:30)
group1<-rep(c("C1","C2","C3"),10)
group2<-rep(c("a","b"),each=15)
df<-data.frame(x,y,group1,group2)
ggplot(df,aes(x,y))+geom_point(aes(colour=group1,shape=group2),size=3)
Here is my plot:
I just want a single legend shown in the plot, how can I do this?