xmlSVG: Run plotting code and return svg

Description Usage Arguments Value Examples

Description

This is useful primarily for testing. Requires the xml2 package.

Usage

1
xmlSVG(code, ..., standalone = FALSE, height = 7, width = 7)

Arguments

code

Plotting code to execute.

...

Other arguments passed on to svglite.

standalone

Produce a standalone svg file? If FALSE, omits xml header and default namespace.

height

Height and width in inches.

width

Height and width in inches.

Value

A xml2::xml_document object.

Examples

1
2
3
4
5
if (require("xml2")) {
  x <- xmlSVG(plot(1, axes = FALSE))
  x
  xml_find_all(x, ".//text")
}


Search within the svglite package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.