Description Usage Arguments Value
Basically a convenience wrapper that opens graphical device (with Cairo), saves the provided ggplot object and closes it again. Helpfully it will automatically calculate and use an aspect ratio if possible (and not provided).
1 |
p |
The plot to be saved. |
filename |
The filename of the saved plot (character string) omitting the file type extension |
type |
The type of file to make, defaults to "png" but also "pdf" and others are possible (see options to Cairo::Cairo function) |
height, width |
The height and width of the plot (as numeric) units will depend on the type parameter, it is pixels for "png" and inches for "pdf |
... |
Passed to Cairo function |
Nothing, function prints a plot to a file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.