square: Export the a 6000 x 6000 px jpeg or png image

Description Usage Arguments Details Examples

View source: R/square.R

Description

Saves a plot object as an image file that meets the dimension requirements of most products on Society6 (7500 x 9000 px)

Usage

1
square(filename = "plot", plot, filetype = c("jpeg", "png"), dpi = 300)

Arguments

filename

the filename including the extension

plot

the plot object you want to export

Details

Note: current options are jpg or png, and this function has NOT been tested on Windows.

Examples

1
2
3
4
5
6
7
8
## ggplot2 example
p <- ggplot(iris, aes(Sepal.Length, Petal.Length)) + geom_point(aes(color = Species))
square(filename = "iris_ggplot.png", plot = p, filetype ="png")

## Base R Plot workflow:
plot(x)
dev.print(jpeg, "x.jpeg", width = 9000, height = 7500, res = 300, units = "px")
dev.off()

Myfanwy/sizer documentation built on May 9, 2017, 12:21 p.m.