SVG backend

Here's a more complete version. It works with matplotlib-0.54 now, and
I've tested it with a few of the example scripts, though I'm sure there
are bugs. It doesn't do images or mathtext yet.

I found out that Inkscape doesn't support clipping yet, so it's sort of
useless right now for some plots. The viewer I used to test the backend
was the Adobe SVG plugin, which is available for lots of platforms:
http://www.adobe.com/svg/

It still might be useful to implement PolygonCollections, because it
might decrease the file size if, for the markers, we define a shape with
its properties, and then just translate it to make copies. I also just
noticed the 'marker' element, which looks promising.

Jared

backend_svg.py (9.29 KB)

Jared Wahlstrand wrote:

Here's a more complete version. It works with matplotlib-0.54 now, and
I've tested it with a few of the example scripts, though I'm sure there
are bugs. It doesn't do images or mathtext yet.

I found out that Inkscape doesn't support clipping yet, so it's sort of
useless right now for some plots. The viewer I used to test the backend
was the Adobe SVG plugin, which is available for lots of platforms:
http://www.adobe.com/svg/

It still might be useful to implement PolygonCollections, because it
might decrease the file size if, for the markers, we define a shape with
its properties, and then just translate it to make copies. I also just
noticed the 'marker' element, which looks promising.

Nice work. This was on my ToDo list, but it looks like you beat me to it. I'll
try running it through its paces in the next few days to how it does.

Does this backend use the font_manager to find fonts or does it use the viewers
font manager. They are both based on the same principles, but the viewer may do
a better job, so you might want to consider by-passing the font-manager.

ยทยทยท

--
Paul Barrett, PhD Space Telescope Science Institute
Phone: 410-338-4475 ESS/Science Software Branch
FAX: 410-338-4767 Baltimore, MD 21218