Skip to contents

Render a ggplot/grob/gtable to a magick image

Usage

as_magick(x, width = 6, height = 4, dpi = 300, bg = "white")

Arguments

x

ggplot, grob, or gtable.

width, height

Plot size in inches.

dpi

Resolution for rasterization.

bg

Background color.

Value

A magick-image.