3
<!-- This file has been generated by unroff 1.0, 03/01/02 13:57:15. -->
5
<STYLE TYPE="text/css">
7
A:link{text-decoration:none}
8
A:visited{text-decoration:none}
9
A:active{text-decoration:none}
12
<title>ploticus: scalable vector graphics (svg) format</title>
13
<body bgcolor=D0D0EE vlink=0000FF>
17
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
19
<table cellpadding=2 width=550><tr>
20
<td><br><h2>Scalable vector graphics (SVG) format</h2></td>
23
<a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
24
<a href="../doc/Welcome.html">Welcome</a>
25
<a href="../gallery/index.html">Gallery</a>
26
<a href="../doc/Contents.html">Handbook</a>
33
<title>Manual page for Scalable_vector_graphics_(SVG)_format(PL)</title>
38
ploticus (2.01 or higher, all builds) can produce graphics in SVG format.<tt> </tt>
39
SVG is a vector graphic format supported by
40
<a href="http://www.adobe.com/svg">
44
<a href="http://www.w3.org/TR/SVG/">
47
. SVGs look good because nice fonts are standard,
48
and graphics are easily scaled up or down with no degradation in
50
SVG can be viewed with newer versions of
51
Netscape and MSIE browsers, and can be imported into
52
MS word, MS powerpoint, etc.<tt> </tt>
55
SVG files have names ending in <tt>.svg</tt>.<tt> </tt>
56
SVG files can also be compressed for smaller size; these files have names ending in <tt>.svgz</tt>.<tt> </tt>
57
Browsers and applications that understand SVG generally understand SVG also.<tt> </tt>
58
Compression requires zlib and hence may not be available in all ploticus builds.<tt> </tt>
61
<h2>Generating SVG</h2>
62
To generate SVG, use the <b>-svg</b> or <b>-svgz</b> command line option.
65
<tt>pl -svgz -tag bars2.pl</tt>
68
Output files will have an <tt>.svg</tt> or <tt>.svgz</tt> ending by default.<tt> </tt>
69
The <b>-tag</b> option may be used to have a suitable
70
HTML <tt><EMBED></tt> tag written to standard output.<tt> </tt>
71
The <b>-zlevel </b><i>n</i> option may be used to set the compression level to <i>n</i>
72
(0 - 9 where 9 is highest level of compression).<tt> </tt>
75
<h2>Embedding SVG graphics within HTML</h2>
77
Netscape and MSIE display SVGs using a the Adobe SVG viewer plug-in.
78
To include an SVG graphic in an HTML document, use an <tt><EMBED></tt> tag like this:
81
<embed src="bars2.svg" name="SVGEmbed" width="500" height="616"
82
type="image/svg-xml" pluginspage="http://www.adobe.com/svg/viewer/install/">
85
The <tt>width</tt> and <tt>height</tt> attributes control the size of the graphic
86
so you can adjust these to resize the graphic if desired
87
(the height/width ratio should remain constant).<tt> </tt>
88
As with the <img> tag, src can be any URL, including CGI invocation.<tt> </tt>
89
As mentioned above, the <b>-tag</b> command line option may be used to generate a suitable
90
html <embed> tag containing appropriate height and width values, for convenience.<tt> </tt>
95
<a href="../gallery/gall.svg.html">
96
page of some SVG examples
98
(plug-in will be required).<tt> </tt>
99
Notice how the full size graphics are automatically sized to your browser window.<tt> </tt>
104
Default font is <tt>Helvetica</tt>. Postscript font names such as
105
<tt>Times-Roman</tt> and <tt>Courier</tt> may be used.<tt> </tt>
106
<a href="fonts.html">
112
<h2>Importing SVG into applications</h2>
113
Microsoft Office applications can import SVG graphics.<tt> </tt>
114
On the version I have, import via dragging and dropping works.
115
Import via the "Insert graphic" menu does not.<tt> </tt>
119
<h2>Troubleshooting</h2>
120
The location for downloading the SVG viewer is
121
<a href="http://www.adobe.com/svg/viewer/install">
122
www.adobe.com/svg/viewer/install
124
. Follow the instructions there for easy installation.<tt> </tt>
125
Then restart your browser.<tt> </tt>
126
If your Netscape browser doesn't display SVG properly when originating
127
via a web server, try accessing an SVG file directly using <tt>file:///</tt>.<tt> </tt>
128
If this works then there is probably a mime types problem with your
129
web server. Ask your web server administrator to add a <tt>mime.types</tt> entry
134
image/svg-xml svg svgz
138
Or with apache you can add lines like this to your .htaccess file:
142
AddType image/svg+xml svg
143
AddType image/svg+xml svgz
147
I have noticed that the SVG viewer plugin works differently for Netscape vs. IE,
148
and that there is some occasional flakiness, at least on my system.<tt> </tt>
149
Netscape seems more likely to default to postage-stamp size graphics when
150
sizes aren't fully specified.<tt> </tt>
155
<h2>Acknowledgement</h2>
156
Many thanks to Bill Traill
157
(<tt> bill@traill.demon.co.uk </tt>)
158
for initiating ploticus
159
SVG support and writing the ploticus SVG driver.<tt> </tt>
167
<a href="../doc/Welcome.html">
168
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine <br>
169
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
173
<img src="../gallery/all.gif">
180
Markup created by <em>unroff</em> 1.0, <tt> </tt> <tt> </tt>March 01, 2002.