From: Benjamin R. <ben...@ou...> - 2012-02-16 20:56:13
|
On Thu, Feb 16, 2012 at 2:41 PM, Jerzy Karczmarczuk < jer...@un...> wrote: > I forgot to add something... > > Benjamin Root : > > There is absolutely no reason why a module could not be made for this, > > given that everything in matplotlib is assumed to be vector-based. > > You just need a library that can load up the data in the SVG file into > > information that is sensibly organized. > In principle a decent parser can be added to Matplotlib. But... > > SVG is NOT entirely a vector drawing program!! > > 1. You have gradients, clipping paths, patterns, and filtering, which > interpolates between vector and raster data. You will not implement > easily as an "artist" the blur, displacement maps, or morphologic filters > > matplotlib does have AGG filters, which are very powerful. I do concede that not everything in the SVG spec can be done in matplotlib, but you would be surprised what can be done. > 2. SMIL style animation needs a specific engine, this will not easily > work on a back-end independent framework. > > I believe the context of the question isn't for animations (although we do have a backend-independent framework for them, too), but for static SVGs. I don't think anybody is suggesting a complete solution here. A module that can load up many of the common components of an SVG file into a list of artist and collection objects would be neat, even if it has to throw out lots of data in an SVG file. Of course, because it would be impossible to fully implement, such a module would never be included in matplotlib, but that shouldn't stop someone from creating a useful basic tool. Cheers! Ben Root |