inkysave: Use ggsave to export in a compatible way for inky impression

Description Usage Arguments Examples

View source: R/inky-ggsave.R

Description

Use ggsave to export in a compatible way for inky impression

Usage

1
inkysave(plot, filename, ...)

Arguments

plot

a ggplot object

filename

path to save to

...

other params passed to ggsave

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
df <- expand.grid(x = 1:19, y = 1:16)
df$hex <- sample(factor(1:7), nrow(df), replace = TRUE)

p <- ggplot(df, aes(x, y)) +
 geom_tile(aes(fill = hex)) +
 scale_fill_inky(guide = FALSE) +
 ggplot2::theme_void() +
 ggplot2::coord_cartesian(expand = FALSE)

 inkysave(p, 'filename.jpg')

## End(Not run)

alexwhan/inkyr documentation built on Jan. 26, 2021, 12:28 a.m.