Remove lines from color and fill legends

前端 未结 3 992
不知归路
不知归路 2020-12-03 07:43

I have a plot with three different legends: one for linetype, one for color, and one for fill. In the color and fil

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 08:19

    Using:

    ggplot(df, aes(x,y,fill=con)) + geom_bar(stat='identity') + 
      geom_point(aes(color=col)) +
      geom_hline(data=hline_df,aes(yintercept=y,linetype=name),color='red',show_guide=FALSE) +
      guides(linetype=FALSE,color=FALSE)
    

    gives me this plot: enter image description here

提交回复
热议问题