Add x and y axis to all facet_wrap

前端 未结 5 1943
离开以前
离开以前 2020-12-01 06:11

It is often desirable to minimize ink in a plot. I have a faceted plot (facet_wrap) and would like to remove as much ink as possible yet maintain readability.

5条回答
  •  萌比男神i
    2020-12-01 06:49

    The lemon package adds this functionality; see this vignette. (Example code and plot from there.)

    library(lemon)
    p + facet_rep_grid(drv ~ cyl) + coord_capped_cart(bottom='both', left='both') +
      theme_bw() + theme(panel.border=element_blank(), axis.line=element_line())
    

提交回复
热议问题