xmlSVG {svglite} | R Documentation |
Run plotting code and return svg
Description
This is useful primarily for testing. Requires the xml2
package.
Usage
xmlSVG(code, ..., standalone = FALSE, height = 7, width = 7)
Arguments
code |
Plotting code to execute. |
... |
Other arguments passed on to |
standalone |
Produce a standalone svg file? If |
height , width |
Height and width in inches. |
Value
A xml2::xml_document
object.
Examples
if (require("xml2")) {
x <- xmlSVG(plot(1, axes = FALSE))
x
xml_find_all(x, ".//text")
}
[Package svglite version 2.1.1 Index]