Have a closer look at the example I gave.

The currently released version of matplotlib doesn't support PySide at all. So I cheated and simply drew to the generic Agg backend and then copied the whole figure (gcf = get current figure) into a PySide QImage object at the end. The QImage can then be displayed however you want inside your Qt application. I used a QGraphicsScene but there are other options.

If you really wanted to I guess you could use FigureCanvasAgg as an intermediary - but the process is fundamentally different. You can't just drop that it into your PySide app as a widget like you can with FigureCanvasQTAgg.

As mentioned earlier, if you'd like to use the same code simply wait for the next release of matplotlib which will support PySide or you can get a copy of the source from github master today that also support PySide.

Gerald.

On 20/07/2011 3:59 PM, lionel chiron wrote:
Hi Gerald,

I found yesterday interesting informations on a forum where you answered about Matplotlib and pyside .. but some details are missing to make what I want. Few days ago I developped stuff in PyQt I 'd like to recuperate in Pyside.. the central difficulty is to import Matplotlib in Pyside. In PyQt I was using FigureCanvasQTAgg but in Pyside I couldn't find something equivalent allowing to link Mpl and pyside.. It seems you're able to make drawings (with add.patch) but how to do for inserting a figure?

Thanks

Best

Lionel


------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to