RSVGTipsDevice.future: Design and future of the SVG Graphics Driver with dynamic tips
Description
The design of this driver is that it can be used with ordinary R
plotting commands. The extra information needed for tooltips and
hyperlinks is supplied by a call to a separate function call before
the call to the plotting function that generates the shape.
Extra information for only one shape can be supplied this way, so
shapes that have tooltips or hyperlinks must be drawn one at a time.
Arguments
SVG coding style
It appears that preferred SVG coding styles have changed over time.
The defaults in this driver are those suggested at
http://jwatt.org/svg/authoring/.
In particular:
The driver output by default does NOT include a DOCTYPE DTD (it is
recommended at http://jwatt.org/svg/authoring/ to NOT include a
DOCTYPE declaration.)
Use shape properties directly rather than specifying them via
style property, e.g., prefer this:over this:.
Limitations
This driver currently does not have any font metric information,
so the use ofplotmathis not supported.
This device will not successfully record tool tips and hyperlinks if
it is called bydev.copy- the functions to add tool tips and
hyperlinks are ignored by other devices.
Future development possibilities
Add font metric information to support the use ofplotmath.
Clean up the two-line tooltip SVG code:
The two-line tooltip mode displays OK in the default SVG renderers in Firefox (under Windows
2000/XP and Linux) but does not display in the Batik standalone SVG
viewer. It probably needs declarations to extend XML elements:
http://www.w3.org/TR/SVG/extend.html
23.5 Adding private elements and attributes to the DTD.
Provide post-processing to use CSS (cascading style sheets) to make SVG files with
lots of elements more compact.