deepr icon indicating copy to clipboard operation
deepr copied to clipboard

13.2.5 Many Figures In One Subplot -- Would `par(fig)` would be worth mentioning?

Open J-Moravec opened this issue 1 year ago • 1 comments
trafficstars

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().

J-Moravec avatar Jan 10 '24 21:01 J-Moravec

Oh, I forgot about this one, thanks! I'll add it in the next release (some time later).

gagolews avatar Jan 11 '24 23:01 gagolews

Done, thanks again.

gagolews avatar Aug 21 '24 12:08 gagolews