下面代码给出了两个图例,线与点分离。。
求教:怎样将线和点合并为一幅图例,要求线图例中不含点,点图例中不含线。
- ggplot(mtcars,aes(mpg,wt))+
- geom_point(aes(shape='point'),size=3)+
- geom_smooth(method='lm',se=FALSE,size = 3,aes(linetype="1",color='black'))+
- scale_color_manual(name = "method",labels = 'lm',values = 'red') +
- scale_linetype_manual(name = "method",labels = 'lm',values = 1) +
- scale_shape_manual(name = "method",values = 1)


雷达卡



京公网安备 11010802022788号







