deepr
deepr copied to clipboard
13.2.5 Many Figures In One Subplot -- Would `par(fig)` would be worth mentioning?
In https://deepr.gagolewski.com/chapter/250-graphics.html#many-figures-on-one-page-subplots
par(mfrow) and par(mfcol) is shown in detail. layout() is mentioned as a more complex alternative.
But would par(fig) be worth mentioning as well? Personally, I prefer it for complex plots instead of layout() as it allows the most precise and user-defined division of plot into segments while being much simpler than layout(). It is also the least documented one, since neither mfrow/mfcol parts of par mention it nor layout(), and many R tutorials or even advanced books are perhaps not even aware par(fig) exists.
What par(fig) does is that it defines plotting region in user coordinates. So par(fig = c(0, 1, 0, 0.5)) would be the bottom half of the plotting area. Which, for me, is much easier to think about than how to construct matrix layout for layout().
Oh, I forgot about this one, thanks! I'll add it in the next release (some time later).
Done, thanks again.