Skip to content

Commit

Permalink
Add documentation on appropriate graphics devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughjonesd committed Jan 31, 2024
1 parent e4d7910 commit a5bc00a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/geom-magnify.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ NULL
#' only `shape = "rect"` will work, and the plot inset will not be clipped
#' to the panel area.
#'
#' * R graphics devices are not very predictable. My current recommendations
#' are: `ragg_png` for knitr; `cairo_pdf` for PDF output; RStudio `AGG`
#' backend for interactive output. Your mileage may vary.
#'
#' * `geom_magnify()` uses dark magic to deal with faceting. It may break with
#' older, or newer, versions of ggplot2. If you don't need faceting, and want
#' your code to be robust to upgrades, set `options(ggmagnify.safe_mode = TRUE)`
Expand Down Expand Up @@ -349,8 +353,7 @@ GeomMagnify <- ggproto("GeomMagnify", Geom,
gp = gpar(fill = NA,
col = alpha(colour, alpha),
lwd = linewidth * .pt,
lty = inset.linetype
))
lty = inset.linetype))

# == create projection lines =====
proj_df <- if (identical(shape, "rect") && ! inherits(from, "grob") &&
Expand Down
3 changes: 3 additions & 0 deletions man/geom_magnify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a5bc00a

Please sign in to comment.