Manual page for SVG_support(PL)
ploticus can produce graphics in SVG format. SVG is a vector graphic format originated by
and defined in a
. SVGs look good because nice fonts are standard, and graphics scale with no degradation in
appearance. SVG can be viewed using Firefox 1.5+ and MSIE browsers, and can be imported into
tools such as Word, Powerpoint, etc.
There's also the
utility for converting SVG files to PNG or other raster formats.
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.
To generate SVG, use the -svg or -svgz command line option (-svgz gives you
compressed svg results).
pl -svgz -tag bars2.pl
Output files will have an .svg or .svgz ending by default.
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
pl command line options (svg section).
Embedding SVG graphics within HTML
To display an SVG graphic within an HTML document, use an <object> tag like this:
<object data="myresult.svg" type="image/svg+xml" width=300 height=200 title="ploticus example">
An older method involving the <embed> tag is no longer recommended.
The embed tag was used like this:
<embed src="bars2.svg" name="SVGEmbed" width="500" height="616"
Here is a
page of some SVG examples
Notice how the full size graphics are automatically sized to your browser window.
Default font is Helvetica. Postscript font names such as
Times-Roman and Courier may be used.
Font names containing embedded whitespace may be problematic with ploticus' SVG driver.
are supported in browser environments.
Use -csmap command line option.
Here's an example script
You can specify a target window (similarly to HTML <a target=...>)
using this syntax in your ploticus script: clickmapurl: [target=new]http://abc.com/...
(changed in 2.33)
Mouseover text bubbles / tooltips
Mouseover text bubbles
(tooltips), are supported for SVG when viewing in a browser.
from the ploticus download page).
Produces SVGs that support mouseover independently without involving the containing HTML file.
There are some
proc settings attributes
that may be useful.
Here's an example pl script that uses this method.