Re: [Matplotlib-users] matplotlib and pyside..

2011-07-20 Thread Gerald Storer
The version of PySide doesn't really matter so long as it is reasonably 
new.  You need a newer version of Matplotlib and yes, the Github master 
is newer than the current release.


Gerald.

On 20/07/2011 8:29 PM, lionel chiron wrote:

Hi Gerald again,

I recuperated the Pyside last version the 1.0.4 from Pyside's site but 
I obtained the same error message trying to use my former code (same 
used with PyQt with Figure Canvas)

raise ImportError, "Warning: formlayout requires PyQt4>v4.3"
Is the github version even more recent than this one??
Thanks

Regards
Lionel


2011/7/20 Gerald Storer mailto:g...@mrxtech.com.au>>

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







--
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib and pyside..

2011-07-20 Thread Gerald Storer

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


Re: [Matplotlib-users] Matplotlib and PySide ?

2010-09-23 Thread David Trémouilles
> On Wed, Sep 15, 2010 at 3:03 AM, David Trémouilles  > wrote:
>
> Hello,
>
>   Does anybody know if matplotlib work with pyside ?
> If it does how to use matplotib with pyside ?
>
> Thanks,
>
> David
>
>
> David,
>
> I am not familiar with PySide, so I looked it up.  Please correct me if
> I am wrong, but it appears to be an alternative to PyQt for licensing
> reasons, and the FAQ says that it is API compatible.  On the python side
> of matplotlib, I wonder if using PySide would be as simple as just
> replacing all of the "import PyQt" or "import PyQt4" with "import
> PySide" (and all the "from PyQt import ...").
>
> Does PySide still use the same compiled Qt libraries that PyQt uses?  If
> so, then I don't *think* you need to recompile the Qt backends, but I am
> not entirely sure.
>
> Good luck!
> Ben Root
>

Hi Ben,
I did try to roughly replace PyQt4 import by PySide import
in my installed matplotlib but pyplot.plot function led to a seg fault...
(PyQt and PySide where indeed compiled with the same Qt lib)

I'm not skilled enough to go further on...

Thanks for your help,

David

--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib and PySide ?

2010-09-15 Thread Benjamin Root
On Wed, Sep 15, 2010 at 3:03 AM, David Trémouilles wrote:

> Hello,
>
>  Does anybody know if matplotlib work with pyside ?
> If it does how to use matplotib with pyside ?
>
> Thanks,
>
> David
>
>
David,

I am not familiar with PySide, so I looked it up.  Please correct me if I am
wrong, but it appears to be an alternative to PyQt for licensing reasons,
and the FAQ says that it is API compatible.  On the python side of
matplotlib, I wonder if using PySide would be as simple as just replacing
all of the "import PyQt" or "import PyQt4" with "import PySide" (and all the
"from PyQt import ...").

Does PySide still use the same compiled Qt libraries that PyQt uses?  If so,
then I don't *think* you need to recompile the Qt backends, but I am not
entirely sure.

Good luck!
Ben Root
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib and PySide ?

2010-09-15 Thread David Trémouilles
Hello,

  Does anybody know if matplotlib work with pyside ?
If it does how to use matplotib with pyside ?

Thanks,

David

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users