any fast plot(2d and 3d) lib which can be embeded into wxpython?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

any fast plot(2d and 3d) lib which can be embeded into wxpython?

oyster-2
In my current code, I use matplotlib in wxpython just because I have learned and used them before. However I find that matplotlib is too slow for my 2d and interactive 3d plot.

After a quick search I found that pyqtgraph is a fast plot lib for pyQT, and chaco is a faster 2d plot lib.

So is there an up-to-date plot lib comparison to direct my selection based on *ALL* of the conditions:
1. It must be fast to ~30fps
2. It can handle both 2D and 3D plot. At least, 3D rotation must be supplied for 3D plot
3. It can be embeded into wxPython or pyQT. Since I have never used pyQT before, I prefer to wxPython. But if there is no wxPython solution, I have to learn pyQT of cause.

Thanks



--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: any fast plot(2d and 3d) lib which can be embeded into wxpython?

Matt Newville

On Fri, Oct 26, 2018 at 4:09 AM Oyster <[hidden email]> wrote:
In my current code, I use matplotlib in wxpython just because I have learned and used them before. However I find that matplotlib is too slow for my 2d and interactive 3d plot.

After a quick search I found that pyqtgraph is a fast plot lib for pyQT, and chaco is a faster 2d plot lib.

So is there an up-to-date plot lib comparison to direct my selection based on *ALL* of the conditions:
1. It must be fast to ~30fps
2. It can handle both 2D and 3D plot. At least, 3D rotation must be supplied for 3D plot
3. It can be embeded into wxPython or pyQT. Since I have never used pyQT before, I prefer to wxPython. But if there is no wxPython solution, I have to learn pyQT of cause.

Thanks


I think that when you phrase it as a list of demands that all must be met, the easiest answer is always going to be No.   On the other hand, you might ask questions like "what other libraries are available for faster plotting?",  or "why is my use of matplotlib slow, and what might be done to speed it up?". 

If that was your intention, you might find wxmplot (http://newville.github.io/wxmplot/) useful or at least instructive.  This library wraps wxPython and matplotlib.   The demos include an example of relatively fast updating of a 2D plot.   I use this all the time in my work as a stripchart and for live update of incoming data.   The update rate varies by OS (and I suspect graphics card), but is typically in the 10 to 20 fps range.  

In your list of demands that probably fails.  Then again, the requirement of 30 fps might be unnecessary, at least for most human perception.   I find that 10 to 15 fps is acceptable, especially given the other conveniences and features of matplotlib.  For reference, I have a color CMOS camera that I use for a live microscope image (using wxPython but not matplotlib).  The *camera* is limited to 15 fps.  The wxPython display keeps up just fine, and no one using the microscope interface ever complains about the image being too slow.

Wxmplot can show false color images of 3D data, and these can also update at about the same rate, depending somewhat also on image size.  It doesn't directly support matplotlib's mpl_toolkits.mplot3d.  I do sometimes make one-off 3D images, but I don't think I've ever tried to do that with interactivity.   If you are interested, adding such 3D functionality to wxmplot would be great.  I would use that...

That's all to say that you might find existing solutions are sufficient or can be made so. 
Hope that helps,

--Matt Newville 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: any fast plot(2d and 3d) lib which can be embeded into wxpython?

Chris Barker - NOAA Federal
In reply to this post by oyster-2
On Fri, Oct 26, 2018 at 2:09 AM, Oyster <[hidden email]> wrote:
So is there an up-to-date plot lib comparison to direct my selection based on *ALL* of the conditions:

I don't think so -- but maybe you can start one :-)

1. It must be fast to ~30fps
2. It can handle both 2D and 3D plot. At least, 3D rotation must be supplied for 3D plot
3. It can be embeded into wxPython or pyQT. Since I have never used pyQT before, I prefer to wxPython. But if there is no wxPython solution, I have to learn pyQT of cause.

I'd take a look at VisPy -- built on modern OpenGL from the ground up so about as fast as you can get. And it supports wxPython:


It doesn't look as actively maintained as I"d like, but well worth checking out -- particularly if you'd be interested in working on it if you find bugs or missing features.

-CHB



 
Thanks



--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[hidden email]

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: any fast plot(2d and 3d) lib which can be embeded into wxpython?

Tim Roberts
In reply to this post by oyster-2
Oyster wrote:
>
> So is there an up-to-date plot lib comparison to direct my selection
> based on *ALL* of the conditions:
> 1. It must be fast to ~30fps

What does frame rate mean for a plot?

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

smime.p7s (5K) Download Attachment