SVGThis {BrailleR}R Documentation

Save commonly used graphs as structured SVG files.


Converts a graph object (as long as it has a class assigned) or the current graph window to an SVG file that can be viewed using a browser (not IE) or the Tiger Player software available from ViewPlus Inc. At present, the SVG needs manual editing using the Tiger Transformer software before viewing in the Tiger Player.


SVGThis(x, file = "test.svg", ...)



a graph object for which a method exists, or the current graphics device if set to NULL.


The SVG file to be created.


Arguments to be passed to the methods.


The Cairo SVG device found in the gr.devices package does not create a structured SVG file that includes the semantics of the graphic being displayed. The SVG created by the gridSVG package does meet this need, but only works on graphs drawn using the grid package. Any graph created using functions from the more common graphics package can be converted to the grid package system using the gridGraphics package.

The SVGThis.ggplot method accepts argument createDevice (default TRUE) - if true the method creates its own null pdf device to draw the graph on, if false it draws on the current device.


NULL. This function is solely for the purpose of creating SVG files in the current working directory or in a path of the user's choosing.


A. Jonathan R. Godfrey and Paul Murrell


P. Murrell and S. Potter (2014) “The gridSVG package” The R Journal 6/1, pp. 133-143.

P. Murrell (2015) “The gridGraphics package”, The R Journal 7/1 pp. 151-162.

P. Dengler et al. (2011) Scalable vector graphics (SVG) 1.1, second edition. W3C recommendation, W3C.

[Package BrailleR version 0.32.1 Index]