diff --git a/README.Rmd b/README.Rmd index 4f5ce8d..46ae37a 100644 --- a/README.Rmd +++ b/README.Rmd @@ -246,6 +246,15 @@ ggpi + ## Tips and tricks +### Graphics devices + +`geom_magnify()` uses masks. This requires R version 4.1.0 or higher, and a +graphics device that supports masking. If you are using knitr, you may have +luck with the `ragg_png` device (which was used to create this README). If your +device doesn't support masks, only `shape = "rect"` will work, and the plot +inset will not be clipped to the panel area. + + ### Adding layers to the inset `geom_magnify()` stores the plot when it is added to it. So, order matters: diff --git a/README.md b/README.md index 3da1434..9c9e60e 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,14 @@ ggpi + ## Tips and tricks +### Graphics devices + +`geom_magnify()` uses masks. This requires R version 4.1.0 or higher, +and a graphics device that supports masking. If you are using knitr, you +may have luck with the `ragg_png` device (which was used to create this +README). If your device doesn’t support masks, only `shape = "rect"` +will work, and the plot inset will not be clipped to the panel area. + ### Adding layers to the inset `geom_magnify()` stores the plot when it is added to it. So, order