Alter just horizontal spacing between facets (ggplot2)

后端 未结 2 504
误落风尘
误落风尘 2020-12-29 21:07

ggplot2 has the ability to change the margins between a faceted plot using the argument panel.margin in opts. This seems to change bo

2条回答
  •  鱼传尺愫
    2020-12-29 21:38

    As of July 9th, 2015, the panel.margin.x and panel.margin.y seem to have been implemented

    p <- p + theme(panel.margin.x=unit(0.5, "lines") , panel.margin.y=unit(1,"lines"))
    

    As of December 15, 2016, 'panel.spacing' and 'panel.spacing.x' is implemented in r 3.3.2 and ggplot2 2.2.0

    p <- p + theme(panel.spacing.x=unit(0.5, "lines"),panel.spacing.y=unit(1, "lines"))
    

提交回复
热议问题