save.figure | R Documentation |
This function saves a figure generated by ggplot2 and its associated data table in multiple formats.
save.figure(
g,
tab,
caption,
path,
fn,
width = NA,
height = NA,
add.to.caption = NULL
)
g |
A ggplot object to save. |
tab |
A data frame or table that contains the data used to create the figure. |
caption |
A text caption for the figure. |
path |
A directory path where the files will be saved. |
fn |
The base filename (without extension) for the saved files. |
width |
Numeric value for the width of the figure. Default is NA. |
height |
Numeric value for the height of the figure. Default is NA. |
add.to.caption |
Optional additional text to append to the figure's caption. |
A message indicating the completion of the saving process.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.