baptiste/gridExtra

Row-wise fill using marrangeGrob

Opened this issue · 2 comments

Prior to version 2.3, plots from a list would fill row-wise. Now they fill column-wise. I could not find a setting to switch back to row-wise filling.

Hmm, it seems I didn't think much when I added the layout_matrix argument to marrangeGrob at the request of one user. It's basically overriding any other layout parameters.

That being said, at the price of a somewhat more verbose call you can still achieve the same result,

library(gridExtra)

lg <- replicate(10, grid::rectGrob(width=0.8,height=0.8),F)
marrangeGrob(lg, layout_matrix = matrix(1:4,  nrow = 2, ncol=2, byrow=TRUE))

Hi,
even thought this is quite old by now, would be great to have a more intuitive/easier solution in a future update, to quickly switch between col-wise and row-wise.