Description Usage Arguments Value See Also Examples
Export Current Drawing Page to a File
1 2 3 |
f |
Character value of the file path to save to. Must include file name and extension. |
width |
Numeric value of the image width. |
height |
Numeric value of the image height. |
ppi |
Numeric value of the image resolution quality in Pixels Per Inch (PPI). |
format |
Character value of the extension for file without a period ".". |
textSize |
Size of text (pt) in image. |
units |
Character value for the unit to use when specifying measurements. Can be one of the following:
|
... |
Additional arguments passed to dev.copy. |
The name and number of the device, according to dev.copy, which has been copied to.
drawSettings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(draw)
# Set drawing settings
drawSettings(pageWidth = 5, pageHeight = 5, units = "inches")
# Create a new drawing page
drawPage()
# Draw a square
drawBox(x = 1, y = 4, width = 2, height = 2)
# Export the drawing page to a PDF
drawExport("export.pdf")
# Export the drawing page to a PNG
drawExport("export.png", ppi=300)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.