Learn R Programming

rvg (version 0.1.2)

dsvg: SVG Graphics Driver

Description

This function produces SVG files (compliant to the current w3 svg XML standard) where elements can be made interactive.

Usage

dsvg(file = "Rplots.svg", width = 6, height = 6, bg = "white", pointsize = 12, standalone = TRUE, canvas_id = 1, fonts = list(), fontname_serif = NULL, fontname_sans = NULL, fontname_mono = NULL, fontname_symbol = NULL)

Arguments

file
the file where output will appear.
height, width
Height and width in inches.
bg
Default background color for the plot (defaults to "white").
pointsize
default point size.
standalone
Produce a stand alone svg file? If FALSE, omits xml header and default namespace.
canvas_id
svg id within HTML page.
fonts
Named list of font names to be aliased with fonts installed on your system. If unspecified, the R default families sans, serif, mono and symbol are aliased to the family returned by match_family().
fontname_serif, fontname_sans, fontname_mono, fontname_symbol
font names for font faces. Used fonts should be available in the operating system. These arguments are deprecated in favor of the fonts argument.

See Also

Devices

Examples

Run this code

dsvg()
plot(rnorm(10), main="Simple Example", xlab = "", ylab = "")
dev.off()

Run the code above in your browser using DataLab