From: David H. <dav...@gm...> - 2011-08-22 14:57:10
|
Hi, I'm trying to create an SVG figure that will show or hide the bars of a histogram when clicking on the element in the legend. I got to the point where it almost works... I'm including the script so that others can play with it, but from what I understand, the problem is that the first histogram patch definition includes a clipping path definition <defs> <clipPath id="p7ff5b81e1d"> <rect height="345.6" width="446.4" x="72.0" y="43.2" /> </clipPath> </defs> that is referenced by all other histogram patches. When setting the visibility attribute of the first patch to "hidden" , it hides all patches. If I remove this clipping path entirely (by hand), the interactive components work as expected. This is my first foray in SVG so my approach is probably naive, but I'd welcome suggestions to make this work. Having one clippath per histogram item would simplify things, but I don't know the internals of matplotlib well enough to do this elegantly. Thanks, David |