Export draw() plots to files.
drawToFile.RdExport draw() plots to files.
Usage
drawToFile(
plot,
filename = "humdrumR_draw.png",
overwrite = FALSE,
width = NULL,
height = NULL,
...
)Arguments
- plot
A plot object (created by
draw()).- filename
What filename to draw to?
Must be a single
characterstring.The
filenamestring must end with a file extension: either.bmp,.jpg(or.jpeg),.pdf,.png,.svg, or.tiff. This determines what format is used.- overwrite
Whether to overwrite files without asking for permission.
Defaults to
FALSE.If
TRUE,drawToFile()will overwrite files without asking for permission. Otherwise, it will ask for keyboard confirmation before overwriting.- width, height
Width and height of plot in output file.
Must be single
characterstring ornumericvalues, or may beNULLIf a
characterstring, the string must begin with a number followed immediately by a valid unit abbreviation—eithermm(millimeters),cm(centimeters),in(inches) orpx(pixels). Ifnumeric, the unit is taken to be inches.If
NULL, sizes are selected based on plot itself.
See also
Used with the draw() function.