From: Andrew S. <mat...@an...> - 2008-10-29 22:06:39
|
Hi, I have a requirement to make clickable bar charts using the SVG output (rather than html maps). An initial look has suggested that the following changes would be required: backend_bases.py: Add a url property to GraphicsContextBase (defaulting to None, so it's all backwards compatible) axes.py: Add a url option to the bar function and pass this on to the constructor of the Rectangle object patches.py: Pass the url option in the constructor for the Patch object to the GraphicsContextBase object created in the draw function backends/backend_svg.py: Add check to _draw_svg_element for url set in gc. If it is, write out SVG code for xlink. I can make these changes and (if people think it would be useful) contribute the changes back. However, before I do this, I wanted to check whether this is the right approach to take - I'm not experienced with the internals of matplotlib and so if there's a better way of doing it, I'd be grateful for the advice. Once I got the bar charts working, I would be interested in possibly extending this to other chart types. Regards Andrew |