Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore alternative frameworks to speed up scatter plots #722

Closed
astrofrog opened this issue Aug 16, 2015 · 6 comments
Closed

Explore alternative frameworks to speed up scatter plots #722

astrofrog opened this issue Aug 16, 2015 · 6 comments

Comments

@astrofrog
Copy link
Member

We should explore the use of VisPy and PyQtGraph to make scatter plots. This issue is to keep track of findings related to this.

@astrofrog
Copy link
Member Author

cc @nmearl @stscieisenhamer @ibusko, in case you have any insight relating to PyQtGraph and performance

@astrofrog
Copy link
Member Author

Just for info, PyQtGraph, while fast for lines, is not going to work for scatter plots: pyqtgraph/pyqtgraph#217

@nmearl
Copy link

nmearl commented Sep 15, 2015

Indeed. While fast scatter plots are possible in PyQtGraph using OpenGL (specifically, the GLScatterPlotItem widget), the author has indicated that the pipeline will be replaced with VisPy.

The 3D graphics system in pyqtgraph is composed of a view widget and several graphics items (all subclasses of GLGraphicsItem) which can be added to a view widget.

Note 1: pyqtgraph.opengl is based on the deprecated OpenGL fixed-function pipeline. Although it is currently a functioning system, it is likely to be superceded in the future by VisPy.

Note 2: use of this system requires python-opengl bindings. Linux users should install the python-opengl packages from their distribution. Windows/OSX users can download from http://pyopengl.sourceforge.net.

@nmearl
Copy link

nmearl commented Sep 15, 2015

As a side note, you can get some pretty good performance gains by enabling down sampling and view clipping.

 import pyqtgraph as pg
 import numpy as np

 pw = pg.plot(title="Testing")
 pw.setDownsampling(ds=True, auto=True, mode='peak')
 pw.setClipToView(True)
 pw.plot(np.arange(1e5), np.random.sample(1e5), symbol='o')

@astrofrog
Copy link
Member Author

Also requested in #403, and the official issue to keep track of this is glue-viz/glue-vispy-viewers#138.

@astrofrog
Copy link
Member Author

This isn't so much of a problem anymore now with the scatter density plots, so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants