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 just tried it and actually got simple_plot to work - excellent!

I'm about to do a bug fix release of 0.54. Would you like to release
the code under the matplotlib license? If so I'll include it, but
hold off on announcing it until you are ready.

Another thing that might be useful for SVG is to add grouping
elements. Eg, in axes.draw we could add

def draw(...)

  renderer.begin_group('axes')
  ..plot a bunch of stuff
  renderer.end_group('axes')

backend renderers that don't support groupings could just pass on
these calls, but for those who do, like svg, we could add the
appropriate grouping commands. Ditto for legends, axis, etc. This
might help the matplotlib svg output play nicely with svg editors.

JDH

Not that I have any clue how it's implemented, but Adobe Illustrator somehow does this in (E)PS, and PDF formats. It would be so cool if matplotlib achieved this, too.

But, as matplotlib gets better and better, that becomes less and less necessary.

Cheers!
Andrew

···

On May 27, 2004, at 10:31 AM, John Hunter wrote:

Another thing that might be useful for SVG is to add grouping
elements. Eg, in axes.draw we could add

def draw(...)

  renderer.begin_group('axes')
  ..plot a bunch of stuff
  renderer.end_group('axes')