Render a ggplot/grob/gtable to a magick image
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
p <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) +
ggplot2::geom_point()
as_magick(p)
}
#> # A tibble: 1 × 7
#> format width height colorspace matte filesize density
#> <chr> <int> <int> <chr> <lgl> <int> <chr>
#> 1 PNG 1800 1200 sRGB FALSE 44055 118x118