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.
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.
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. http://journal.r-project.org/archive/2014-1/RJournal_2014-1_murrell-potter.pdf
P. Murrell (2015) “The gridGraphics package”, The R Journal 7/1 pp. 151-162. http://journal.r-project.org/archive/2015-1/murrell.pdf
P. Dengler et al. (2011) Scalable vector graphics (SVG) 1.1, second edition. W3C recommendation, W3C. http://www.w3.org/TR/2011/REC-SVG11-20110816/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.