Description Usage Arguments Value Author(s) See Also Examples
This function allows one to associate target URLs with axes labels and plot titles so that the viewer can click on the text and jump to the corresponding URL.
If successful, this also adds the specified CSS content, but won't re-add it if it is already in the document.
1 2 | addAxesLinks(doc, links, nodes = getAxesLabelNodes(doc),
css = getDefaultSVGCSS(), style = "link")
|
doc |
the parsed XML document containing the SVG graphic |
links |
a character vector giving the links. At present, this is handled very simply with the elements corresponding to the order of the title and x and y axes assuming they are present. If there is no title, the first element goes with the X axes label... |
nodes |
the nodes |
css |
a character vector giving the name of a CSS file
which is added to the file. By default, this is added by reference.
If you want to insert its contents, call |
style |
a CSS style specification. This can be an inlined CSS
specfication of the form "name: value; name: value; ..." such as
"fill: red; stroke: blue;".
Alternatively, this can be a class name which refers to a class
defined in (any of) the CSS content associated with this document.
The function should be able to tell the difference between
an inlined specification and a class name. However, we can
explicitly indicate that it is an inline style by identifying
it as of class |
The modified SVG document.
Duncan Temple Lang
1 2 3 4 5 | doc = svgPlot(plot(1:10))
addAxesLinks(doc, c("http://www.omegahat.org",
"http://www.r-project.org"),
style = "fill: transparent; stroke: red;")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.