I was trying to create some interactive SVGs with matplotlib and I faced the following issues. Some maybe bugs, some other just missing functionality. I'm just summarising my experience so that you are aware of the issues.
First of all I used git-head from a couple of monts ago with python-3.2, and I'm quite happy that it worked. My target was to make the dots in a plot(x,y,"-o") graph clickable. Here are the issues I faced:
* I didn't find a way to set an "id" attribute for each marker. Googling
revealed that I should probably call set_gid() but I had no success. So
I stored the whole XML file into memory and searched for the <use> tags
inside <g id="line2d_1">. The ideal would have been for each <use> to
have a specific id, or at least the <g> containing the <use>s.
* pylab.savefig(f, format="svg") never worked whenever f was sys.stdout or
io.StringIO. It seems that it err'ed on every file that didn't support
open(). My workaround was to write to a tempfile and read back. Maybe
support for this can be added together with support for already opened
files, so that the with-statement works? I /think/ errors were like
File "~/dist/src/matplotlib-git/matplotlib/build/lib.linux-i686-3.2/matplotlib/backends/backend_svg.py", line 1101, in print_svg
return self._print_svg(filename, svgwriter, fh_to_close, **kwargs) UnboundLocalError: local variable 'svgwriter' referenced before assignment
* I couldn't use pylab.ticklabel_format() with SVG engine (I was trying to
apply an offset to the xticks labels), error message was the following,
it's quite probable I don't understand how this works:
File "~/dist/src/matplotlib-git/matplotlib/build/lib.linux-i686-3.2/matplotlib/axes.py", line 2191, in ticklabel_format
"This method only works with the ScalarFormatter.")
* I wanted some onmouseover() bubble annotation over specific markers but I
gave up on this. Ideally I'd want to refer to the markers with a specific
ID, give them different color style, and be able to add specific <title> or
Since I understand this is too much to ask from matplotlib I'd very much
like the possibility to get the XML tree in some form *before* writing
anything to disk. Does the SVG backend use the python xml.etree.ElementTree
module? If only I could get the whole ElementTree, I would manipulate it as
I'd like before writing to disk. What would you suggest to achieve the
result I need?
I also had some difficulties with the website. For example when investigating various plotting utilities and checking their SVG output, I couldn't find anywhere the example from  rendered as SVG. The gallery is huge, but it is barely searchable (no text anywhere) so I still might have missed it. Secondly I'd appreciate a table of contents on top of the API pages, e.g. at http://matplotlib.sourceforge.net/api/pyplot_api.html
Finally, using more and more matplotlib I realised that some things are more complex than necessary. I'm talking specifically for when subplots or twin axes are involved. Then it is hard to keep a common legend (you have to keep track of the labels yourself). It is also hard to cycle the colors among the different axes (you have to keep track of the colors yourself). To have a common ylabel among the vertical subplots I just set the ylabel for the middle subplot, which seems like a hack. And also suptitle() seems weaker than title() (not bold, smaller font). Finally labels of yticks many times overlap each other at the border of adjascent subplots, so I have to manually compensate using set_major_locate() for sparser yticks.
Even though some things needed time-consuming hacks, matplotlib worked fine. Thanks for your work on this fantastic library! And if you are curious you can see my automatic generated graphs (temporarily) at:
P.S. I sent this email (slightly changed) again a couple of months ago, but it got stuck in moderation. Thus I send it again now after subscribing, sorry if you get it twice.