Description Usage Arguments Author(s) See Also Examples
Text in an SVG document created by R's graphics system(s)
and libcairo is represented by a general <g>
element. It is sometimes useful to turn these into
1 2 |
node |
the original node |
text |
the text to display in the new |
replace |
a logical value that controls whether we replace the original node |
addChildren |
a logical value |
... |
name = value pairs of attributes for the new SVG text node |
.attrs |
a named list or character vector to use as attributes for the new SVG text node. |
vertical |
a logical value indicating whether the text is known
to be vertical ( |
Duncan Temple Lang
1 2 3 4 5 6 7 8 9 10 11 | doc = svgPlot({
plot(mpg ~ wt, mtcars, main = "Motor Trend Cars")
})
ax = getAxesLabelNodes(doc)
print(ax[[1]])
newTitle = asTextNode(ax[[1]], "Motor Trend Cars")
xmlAttrs(newTitle) = c('font-size' = 20)
newXMLNode("set", attrs = c(attributeName = "text", values = "A, B, C", begin = "1s", dur = "4s"),
parent = newTitle)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.