svglite | R Documentation |
This function produces graphics compliant to the current w3 svg XML standard. The driver output is currently NOT specifying a DOCTYPE DTD.
svglite(
filename = "Rplot%03d.svg",
width = 10,
height = 8,
bg = "white",
pointsize = 12,
standalone = TRUE,
system_fonts = list(),
user_fonts = list(),
web_fonts = list(),
id = NULL,
fix_text_size = TRUE,
scaling = 1,
always_valid = FALSE,
file
)
svglite provides two ways of controlling fonts: system fonts
aliases and user fonts aliases. Supplying a font alias has two
effects. First it determines the font-family
property of all
text anchors in the SVG output. Secondly, the font is used to
determine the dimensions of graphical elements and has thus an
influence on the overall aspect of the plots. This means that for
optimal display, the font must be available on both the computer
used to create the svg, and the computer used to render the
svg. See the fonts
vignette for more information.
This driver was written by T Jake Luciani jakeluciani@yahoo.com 2012: updated by Matthieu Decorde matthieu.decorde@ens-lyon.fr
W3C Scalable Vector Graphics (SVG): https://www.w3.org/Graphics/SVG/
pictex
, postscript
, Devices
# Save to file
svglite(tempfile("Rplots.svg"))
plot(1:11, (-5:5)^2, type = "b", main = "Simple Example")
dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.