I am trying to plot a number of graphs next to each other using grid.arrange. Specifically, I would like the plots to have a shared x axis label and a legend at the bottom. Here is the code I am using for the arrangement (working example here), sans the universal x axis:
plot.c <- grid.arrange(arrangeGrob(plot.3 +
theme(legend.position="none"),
plot.2 + theme(legend.position="none"),
plot.4 + theme(legend.position="none"),
nrow=1),
my.legend,
main="Title goes here",
left=textGrob("Y Axis", rot = 90, vjust = 1),
nrow=2,heights=c(10, 1))
The legend is a TableGrob object; the universal x axis should be a textGrob along the lines of
bottom=textGrob("X Axis")
However, if I add that to the code, the legend is moved to the right side. If I indicate that both legend and label should be at the bottom, one of them still moves to the right side. Thus the question, is there a way of combining a universal x axis label with a legend at the bottom?