save_png | R Documentation |
this was previously contained within each of the SSplotXXX() functions. It (1) translates the not-quite-matching specifications for the image to the values needed by png(), then (2) returns the plotinfo data.frame (which exists within each function which calls this) after adding a row with the filename and caption for each new plot Note: this just opens the png device which needs to be closed via dev.off() outside this function.
save_png( plotinfo, file, plotdir, pwidth, pheight, punits, res, ptsize, caption = NA, alt_text = NA, filenameprefix = NA )
plotinfo |
table of information about all plots |
file |
filename to write to (including .png extension) |
plotdir |
directory where plots will be written |
pwidth |
Default width of plots printed to files in units of
|
pheight |
Height of plots printed to png files in units of |
punits |
Units for |
res |
Resolution of plots printed to files.
The default is |
ptsize |
Point size for plotted text in plots printed to files (see
|
caption |
caption for the image |
alt_text |
alternative text for screen readers (if left as NA then will be set based on the caption) |
filenameprefix |
Additional text to append to PNG or PDF file names. It will be separated from default name by an underscore. |
Ian G. Taylor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.