在ggplot中调整宽度和高度

时间:2020-03-13 08:01:51

标签: r ggplot2

我正在使用ggplot2包在网格中绘制一些变量。我希望获得有关调整宽度以使每个面板更宽的建议

我的代码如下


g2 <- ggplot(data = nominal) + 
  geom_line(aes(x = Date, y = Value,group=1, col=Levy), size = 1.0) +
  geom_hline(yintercept=0,col="black") + theme_bw() +
  theme(plot.title = element_text(hjust = 0.5), axis.text.x = element_text(angle = 90, hjust = 1)) +
  labs(caption = "Nominal Increases in Levies: 2010-2019", x = "Year", y = "Cents per Litre") + 
  facet_wrap(~Levy, scales = "free") + guides(color = FALSE)



print(g2)

我附上了以下输出

关于添加哪些内容来调整这些面板的宽度和高度的任何建议?

TIA enter image description here

0 个答案:

没有答案