Closed PierreP92 closed 4 years ago
Hi @PierreP92 ,
By default Gramm aggressively resizes subplots so that they stay close together, even when you resize the window (this is a dynamic process). Using rows / columns of Gramm objects this dynamic resizing is independent between the Gramm objects and explains what you see.
The solution is thus to override the dynamic resizing and set subplot spacing values to satisfying ones. This is all done with set_layout_options()
(see doc and examples.m
). Set 'redraw'
to false
and adjust margin_height
, margin_width
and gap
. You will want to adjust these values for the final size of the figure you want, resizing won't be as nice as usual.
Hi Pierre,
thanks a lot for developing Gramm - it is a really useful set of functions and I recommend it to colleagues a lot!
I am encountering an issue with vertically aligning 2 facet grids. As you can see on the image attached, when the two variables have a different range of values, the width occupied by each subplot changes so the two rows are not properly aligned.
The core of my code looks something like this:
Could you please advice on how to fix this?
Thanks a lot,
Pierre