ggartprint_preview: Preview your art print

View source: R/ggartprint.R

ggartprint_previewR Documentation

Preview your art print

Description

This function takes a ggplot2 output and gives a preview of how the plot will look as an art print. While it's totally fine to just call ggirl::ggartprint to preview, this allows you to preview locally.

Usage

ggartprint_preview(plot, size, orientation, ...)

Arguments

plot

the plot to use as an art print

size

the size of the art print. Use ggartprint_sizes() to see a list of the sizes. If a size isn't available that you want email ggirl@jnolis.com for custom sizes.

orientation

should the plot be landscape or portrait?

...

other options to pass to ragg::agg_png() when turning the plot into an image.

Details

The preview will appear in either the "Viewer" pane of RStudio or in your browser, depending on if RStudio is installed or not. The preview includes a frame, but that will not be included with the print.

See Also

ggartprint() to order the art print

Examples

library(ggplot2)
library(ggirl)
plot <- ggplot(data.frame(x=1:10, y=runif(10)),aes(x=x,y=y))+geom_line()+geom_point()+theme_gray(48)
ggartprint_preview(plot, size="11x14", orientation = "landscape")

jnolis/ggirl documentation built on July 1, 2023, 4:51 p.m.