[IPython-dev] [QUAR] Re: Qt SVG clipping bug (it's NOT a matplotlib bug)- Qt won't fix...

Mark Voorhies mark.voorhies at ucsf.edu
Thu Oct 14 14:50:18 EDT 2010


On Thursday, October 14, 2010 10:02:27 am Brian Granger wrote:
> Mark,
> 
> I like the idea of getting the .PNG rather than the .SVG, but can we
> still embed it in the html output?

The HTML export shouldn't care -- it's still seeing a QImage object with
a save method (hurray for encapsulation).

Some of the SVG functions may need a bit more overhead (since they're
no longer "first class") but I've already added some of this for the XHTML
export (via the _name_to_svg dict that Fernando suggested) so it shouldn't
be too bad.

--Mark

P.S. What would be really nice, long term, would be for the Qt figure widget
to hold SVG, PNG, and PDF from Matplotlib (or just a copy-on-write reference
to the figure if we want to be lazy) and return the appropriate representation
depending on context.  I think that this would be a way to get vector figures
in PDF output (e.g., if the widget can tell its being called by a QPrinter rather
than some other type of QPainter), but this might require fairly deep Qt
hacking...

P.P.S. Tangentially, how easy is it to receive SVG payloads from sources other
than matplotlib (e.g., if I wanted to mix in SVG's from rpy or from a web resource
like Gbrowse)? 



More information about the IPython-dev mailing list