On 08/23/2011 10:06 AM, David Huard wrote: > > You may want to try moving the "<defs>" containing the clipPath up a >> level, so it is a peer with the histogram rectangles. > Yep, that works. > >> That's just a stab in >> the dark. If that turns out that makes the difference, that should be an >> easy enough fix within matplotlib. > That would be great !
I have a fix on this branch here: https://github.com/mdboom/matplotlib/tree/svg_references Would you mind testing it? > I'd be glad to contribute an example for the matplotlib gallery if > there is an interest. I think the SVG+JS combo has a lot of potential, > and matplotlib makes it easy. That would make a great addition. One small comment: I would put the "onclick" handler on the legend handles as well as the legend text. I tried to click the legend handles (with nothing happening) until I realized the "hotspot" was only on the text. For a long time, I have considered having a framework where arbitrary XML attributes can be assigned to artists and written out directly by the SVG writer to avoid the two-pass approach you're using here. (There is already support for assigning hyperlinks to SVG documents, but that could be made more general). But that will require some careful design consideration etc. to get it done. In the meantime, it's useful having an example that shows how to do this using ElementTree to modify the SVG after matplotlib outputs it. Cheers, Mike ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel