It looks like the QtSvg module is targeting SVG Tiny 1.2, which does not 
support clipping:

http://doc.qt.nokia.com/4.3/qtsvg.html

SVG Tiny also limits a lot of the CSS styling things that matplotlib 
makes use of -- though those things are probably easier to workaround if 
necessary.

So, it's not broken so much as scoped below the threshold of usefulness ;)

A possible workaround would be to add vector clipping to matplotlib and 
perform it before output.  This has the nice side benefit of reducing 
file sizes (in many cases).  However, that's a pretty major project to 
get right.

I haven't had a chance to look at the new Qt shell in ipython yet -- but 
is it necessary to go through a file?  Perhaps writing a native Qt4 
backend (rather than the Qt4Agg one we currently have) would allow this 
to work better.  The Qt4 rendering infrastructure itself does seem to 
support clipping.

Mike

On 10/13/2010 07:36 PM, Fernando Perez wrote:
> Hi folks,
>
> [CC'ing mpl-dev just for reference so they know we're taking care of
> this on our side]
>
> I've been investigating further the bug where clipped paths in SVG
> render wrong in our console.  It turns out the mpl team already fixed
> some things on their side, and I can confirm that their SVGs now
> render fine in inkscape.  Here's an annotated example:
>
> http://i.imgur.com/NCSEJ.png
>
> However, the problem seems to be that the Qt SVG renderer simply
> doesn't support clipping paths, period.  Furthermore, they seem to
> have decided they won't fix this, as the bug was closed with "won't
> fix":
>
> http://bugreports.qt.nokia.com/browse/QTBUG-1865
>
> > From the Qt experts: am I misreading this?  Because if we're indeed
> stuck with a half-broken SVG renderer from qt, then we'll need to
> reconsider our implementation of pastefig(), to perhaps support an
> optional format flag so that users can send png if they prefer...
> Bummer.
>
> Cheers,
>
> f
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2&  L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>    


-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to