On 27/09/13 01:26, Guillaume Poulin wrote:
> Le jeudi 26 septembre 2013 21:40:52 UTC+8, Luke Campagnola a �crit :
>
> On Thu, Sep 26, 2013 at 5:59 AM, Jochen Schr�der <
cyco...@gmail.com
> <javascript:>> wrote:
>
> for the program I'm working on I had to do scatterplots of up to
> 1e6 points and found that the current way was too slow for me
> (this might have changed with Guillaume's work). I took a
> different approach to Guillaume and created a 2D OpenGL
> ViewWidget. The quick and dirty approach I took was to simply
> subclass the 3D OpenGL viewwidget and change it to orthographic
> projection and change panning and zooming. Are people interested
> in this work?
>
>
> Hi Jochen,
> I am definitely interested in this approach, but I'm currently
> taking a more drastic route. The plan is to have vispy
> (
www.vispy.org <
http://www.vispy.org>) replace the internals of
> pyqtgraph.opengl, once its 2D graphics visuals are written. Still, I
> might be able to integrate your changes immediately since it is not
> clear when vispy will be ready. Where can I find your changes?
Yes I saw that, but it still seems to be quite a bit in the future correct?
>
> If yes, which way would you prefer for me to integrate this
> properly, should I create a generic GLviewwidget class and
> subclass both the 3d and 2d widget from that?
>
>
> I think my approach would be to keep the GLViewWidget class and add
> a Camera class which could represent various view modes (ortho,
> perspective, stereo) and control modes (3d orbit, 2d pan/zoom, 3d
> flythrough, etc).
>
Do you mean add the camera class as an attribute to the GLViewWidget, or
you want GLViewWidget inherit from the camera class?
> <
https://github.com/pyqtgraph/pyqtgraph/wiki/Planned-Development#gpu-accelerated-plotting>
>
OK I'll have a look.
>
> Luke
>
>
>
> Hi Jochen,
>
> My changes might improve things, but with 1 millions points don't expect
> miracles, maybe ~1Hz not more. It's a little bit better if you zoom and
> just plot some points, but still not miraculous. The bottleneck here is
> Qt (A single call take about 0.5s), so there isn't so much that can be
> done. With this amount of points, the only solutions is probably gpu
> acceleration. By the way, 1e6 points, it's about number of pixels in
> your screen, so it doesn't surprise me that we hit some kind of limit
> over here. Qt is fast, but I doubt it was design with this kind of use
> in mind.
>
Yes I agree, initially I just downsampled the data, however that created
issues when zooming in and out, so I went down the route of using GL. My
biggest issue was actually not really frame rate, but more the delay
when resizing windows which gives the impression of lag. The GL code
version seems to be doing significantly better even on intel graphics
cards.
> I agree with Luke that vispy is probably the way to go, but in the mean
> time you solution can be interesting. Maybe you could fork the project
> on github (
https://github.com/pyqtgraph/pyqtgraph) and put your
> modification there for others to see. Maybe Luke gonna want to merge it.
Yes I was going to do that. At the moment the code just lives on my PC
because I really only created things for my use case so far. I'll post
here once I have integrated and tested with pyqtgraph.
>
> Luke, just to be sure I understand your thought, you would like to add
> an object of class Camera to the GLViewWidget? If it's the case, I agree
> that's would be a nice way to deal with it.
>
Ok let me see if I understand correctly,
> By the way, pyopengl is still buggy under python 3. Currently, On my
> system, I'm not able to compile any shader (syntax error, unexpected
> NEW_IDENTIFIER) and I don't know why. Everything works on python 2.7 thou.
>
> --
> -- [ You are subscribed to
pyqt...@googlegroups.com. To unsubscribe,
> send email to
pyqtgraph+...@googlegroups.com ]
> ---
> You received this message because you are subscribed to the Google
> Groups "pyqtgraph" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
pyqtgraph+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.