|
ploticus can produce graphics in SVG format. SVG is a vector graphic format supported by Adobe Systems and defined in a W3C spec . SVGs look good because nice fonts are standard, and graphics are easily scaled up or down with no degradation in appearance. SVG can be viewed using MSIE and Netscape 4.x browsers, and can be imported into MS word, MS powerpoint, etc.
SVG files have names ending in .svg.
SVG files can also be compressed for smaller size; these files have names ending in .svgz.
Compression requires zlib and hence may not be available in all ploticus builds.
Generating SVGTo generate SVG, use the -svg or -svgz command line option (-svgz gives you compressed svg results).
Output files will have an .svg or .svgz ending by default. The -tag option may be used to have a suitable HTML <EMBED> tag written to standard output. The -zlevel n option may be used to set the compression level to n (0 - 9 where 9 is highest level of compression).
There are several settings / command line options particularly for use with SVG. See
proc settings
and/or the
pl command line options (svg section).
Embedding SVG graphics within HTMLNetscape and MSIE display SVGs using a the Adobe SVG viewer plug-in. To include an SVG graphic in an HTML document, use an <EMBED> tag like this:
<embed src="bars2.svg" name="SVGEmbed" width="500" height="616" type="image/svg-xml" pluginspage="http://www.adobe.com/svg/viewer/install/">
The width and height attributes control the size of the graphic
so you can adjust these to resize the graphic if desired
(the height/width ratio should remain constant).
As with the <img> tag, src can be any URL, including CGI invocation.
As mentioned above, the -tag command line option may be used to generate a suitable
html <embed> tag containing appropriate height and width values, for convenience.
ExamplesHere is a page of some SVG examples (plug-in will be required). Notice how the full size graphics are automatically sized to your browser window.Fonts
Default font is Helvetica. Postscript font names such as
Times-Roman and Courier may be used.
More info
Clickable maps
Clickmaps
are supported in browser environments.
Use either the -map or -csmap command line option (doesn't matter which).
Here's an example.
You can specify a target window (similarly to HTML <a target=...>)
by using the
proc settings svg_linkparms
attribute.
Mouseover text bubblesMouseover text bubbles , sometimes called "tooltips", are supported for SVG when viewing in a browser. Beginning in ploticus version 2.30, the default method for producing these was improved. The new method uses 2 javascript files (contributed by Jamie Echlin, available from the ploticus download page) and produces SVGs that support mouseover independently (without involving the containing HTML file). Here's an example pl script that does this. |
![]() data display engine Copyright Steve Grubb ![]() |