gridsvg: gridSVG Graphics Device

View source: R/gridsvg.R

gridsvgR Documentation

gridSVG Graphics Device


Provides a convenient and familiar graphics device interface for the gridSVG package.


gridsvg(name = "Rplots.svg",
        exportCoords = c("none", "inline", "file"),
        exportMappings = c("none", "inline", "file"),
        exportJS = c("none", "inline", "file"),
        res = NULL,
        prefix = "",
        addClasses = FALSE,
        indent = TRUE,
        htmlWrapper = FALSE,
        usePaths = c("vpPaths", "gPaths", "none", "both"),
        uniqueNames = TRUE,
        annotate = TRUE,
        progress = FALSE,
        compression = 0,
        strict = TRUE,
        rootAttrs = NULL,
        xmldecl = xmlDecl(), ...) = dev.cur())


name, exportCoords, exportMappings, exportJS, res, prefix, addClasses, indent, htmlWrapper, usePaths, uniqueNames, annotate, progress, compression, strict, rootAttrs, xmldecl

These parameters are passed onto grid.export.


Further parameters that are passed onto a NULL pdf graphics device. Useful parameters include width and height.


An integer specifying a device number.


These functions provide a more familiar and perhaps convenient interface to gridSVG than grid.export. It uses a PDF device as drawing occurs, but when the device needs to be written out (via then it will save an SVG image instead.

When a grid display list is not in use, or any device other than the gridsvg device is used, the behaviour of is the same as from the grDevices package.


gridsvg returns nothing. will return in the same manner as grid.export. A list is always returned, but invisibly when an invalid filename is given.


Simon Potter

See Also

pdf and grid.export.

gridSVG documentation built on March 31, 2023, 11:17 p.m.