yydev | R Documentation |
Save ggplot object or create plot device.
yydev( filename = "Rplot%03d.tif", width = 12, height = 12, path, dpi = 300, verbose = TRUE, compression = "lzw", fix_text_size = FALSE, ... ) yysave( plot = last_plot(), filename = "Rplot%03d.tif", width = 12, height = 12, path, dpi = 300, compression = "lzw", fix_text_size = FALSE, ... )
filename |
File name to create on disk. |
width, height |
Plot size in cm. Defaults to the 8 x 6 cm. |
path |
Path of the directory to save plot to. |
dpi |
Plot resolution. |
verbose |
logical, whether to display prompts. |
compression |
tiff option, the type of compression to be used. c("none", "rle", "lzw", "jpeg", "zip", "lzw+p", "zip+p"). |
fix_text_size |
svglite option, if TRUE each string will have the textLength CSS property set to the width calculated by systemfonts and lengthAdjust='spacingAndGlyphs'. |
... |
others values from svglite::svglite, grDevices::cairo_pdf, grDevices::tiff, grDevices::jpeg, grDevices::png. |
plot |
Plot to save, defaults to last plot displayed. |
## Not run: ## build device yydev("tmp001.tif") ggplot(mtcars, aes(mpg, wt)) + geom_point() dev.off() ## Export the ggplot image directly. ggplot(mtcars, aes(mpg, wt)) + geom_point() yysave(filename = "tmp003.pdf") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.