ggplot2 theme with no axes or grid

前端 未结 3 1568
感动是毒
感动是毒 2020-12-05 00:24

I am trying to make a plot with no information beyond the data. No axes; no grid; no title; just the plot.

But I keep getting extra margins and padding that I can\'t

3条回答
  •  孤街浪徒
    2020-12-05 01:04

    From ggplot2_2.0.0 you can use theme_void:

    ggplot() + 
      geom_area(data = economics, aes(x = date, y = unemploy), linetype = 0) +
      theme_void()
    

提交回复
热议问题