Add x and y axis to all facet_wrap

前端 未结 5 1854
离开以前
离开以前 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条回答
  •  有刺的猬
    2020-12-01 06:40

    This should simplify things considerably:

    library('ggthemes')
    ggplot(mtcars, aes(mpg, hp)) + geom_point() + facet_wrap(~carb, scales='free') + 
        theme_tufte() + theme(axis.line=element_line()) + 
        scale_x_continuous(limits=c(10,35)) + scale_y_continuous(limits=c(0,400))
    

    enter image description here

提交回复
热议问题