Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
None
-
None
Description
Greetings PySide Developers from PyQtGraph land.
Reading your blog post for the PySide 6.1 release with experimental support for numpy specific methods for plotting, naturally caught our attention. As you can imagine, pyqtgraph deals a lot with bridging the gap from numpy arrays to GraphicsView plots; and given that interactivity of pyqtgraph is the big selling point, anything we can do to speed up that migration of numpy data into QPainter methods is something we have a vested interest in.
This issue/suggestion here specifically requests the addition of QPainter.drawPixmapNp method. We use QPainter.drawPixmap presently for scatter plots. Here is a link to how we handle this now. As you can see, it is a bit ugly.
What would be great, is we can pass a numpy array in directly, that has the shape (4, n) (or (n, 4)) where each element of n would consist of (x, y, w, h) along with a QPixmap object to draw at the associated location. The signature would be QPainter.drawPixmapNp(PyArrayObject*, QPixmap) .
Would this be feasible, and if so, is there anything we can do to assist in this effort? Thanks!
Ogi