Just came across a wonderful GitHub repo on drawing thick lines in modern #OpenGL here: https://github.com/mhalber/Lines ( @mhalber are you the author? if so, nice work!)
I'm trying to decide which of the methods I should use for #PyQtGraph .. I can't use the SSBO since I'm on OpenGL 4.1, which leaves the Geometry Shader, the Instancing Lines and the Texture Buffer Lines methods... If anyone has #OpenGL experience, I'd be curious to know what they would suggest.
Thank you to @numpy and Riverbank Computing for providing Python 3.12 wheels, we were able to verify that #PyQtGraph is ready for Python 3.12 (we'll continue testing as it gets closer to 3.12 release).
@davidr love to hear the 3D elements of the library getting some use. I've decided I'm tired of not knowing anything about #OpenGL so I've started going through the book on https://learnopengl.com Of the 3 places you named where the bug is, there's a 99.9% chance it's in #PyQtGraph's implementation of #OpenGL ... hope you get to the bottom of it!
@ogi I don't have all the #math ironed out yet, but making this work close to how I want is not only possible, it's pretty easy
GLViewWidget already allows moving the zoom/rotation center so really nothing NEEDS doing. I wanted to be able to click 3D objects and set them as the center, which required subclassing
There appears to be a bug (either in #python #opengl or in how #pyqtgraph uses it) that makes this a little tricky but not bad. Main thing is getting #geometry code right
Deets later
#math #python #opengl #geometry #pyqtgraph
@benb it smashed #PyQtGraph’s line plot update benchmark record... my AMD 5900X desktop can do ~1,300 fps.
@ogi I looked at the #pyqtgraph code and docs a little but haven't tried anything yet.
3D line and scatter plots are all based on GLGraphicsItem, which can be rotated around arbitrary axes. In fact, arbitrary *transforms* seem to be possible.
Wouldn't this do more-or-less what I want? (If what I want is clear, which I'm not sure it is, even to myself.)
I'd have to provide the user some way to do this stuff and then transform every object in the scene, tho. Maybe that's what you meant.
@davidr 3D is just not where #PyQtGraph sets itself apart, it is still useful for integration and interactivity bits, but its render performance can't compete with some of the other libraries that use hardware acceleration.
Glad to hear #PyQtGraph has been useful for your work!
@davidr I think to move your center, you effectively need to move everything else. Generally I wouldn’t say the 3D capabilities of #PyQtGraph are as competitive as other offerings like #VisPy or #GlumPy. If neither package works than I would think doing something with the Blender API might be more suitable
Python developers that use #rtx, can you create numerous virtual environments in a similar fashion that pyenv-virtualenv can, allowing you to activate environments by name?
My current workflow for #PyQtGraph involves creating many virtual environments (different combinations of dependencies the project supports), and I frequently switch between them.
@cartocalypse avoid this one, avoid it like the plague... this call has been the source of some really difficult to find bugs in #PyQtGraph. We still use it in a few places in the test code, we are considering introducing it in our exporter code, but we've made effort to remove it from elsewhere.
@computingnature @pyqtgraph If you're already using uint8 with that combination, there likely isn't much in the way of performance that #PyQtGraph can give you unless we figure out how to get our #OpenGL implementation faster (given the expertise of the currently active maintainers, this is unlikely to occur). Sounds like (except for the drawing image) the current setup is working well for you, which is great news! Love seeing the library used in the wild!
@computingnature oh I use qtpy for all my projects, and am considering using it as a dependency for #PyQtGraph (and phasing out our own abstraction layer), it allows for quickly shifting between bindings if I’m suspicious of a pyqt-binding issue.
But just to confirm, native arm64 wheels of PyQt bindings have been available since Qt supported native Arm64 support.
@fluiddyn The #PIV image case would be a good one for #PyQtGraph, given our origins of working with 2D slices of “3D images". Please don't hesitate to reach out if you could use assistance with plotting or trying to improve performance.
Love seeing more scientific computing packages here; on the flip side! A number of our maintainers have worked (or are currently working) in the fluid mechanics field. Would be curious if there is a place for #PyQtGraph in your library!
I want to learn OpenGL, anyone here have recommendations?
For context, this is so I can expand my work on #pyqtgraph which the OpenGL bits are a bit stale since none of the active maintainers know much.
Ideally any recommended resource would talk about best practices for writing code that works cross-platform, and gives guidance for problematic areas (like I’ve heard 64-bit floats can be problematic)
@melissawm yeah I'll be setting up a #pyqtgraph account shortly... next release will be announced here
Any #pyqtgraph users here? Is there a matplotlib (or bokeh/ployly/insert-other-library) that has a plot type that you would find beneficial in your projects if #pyqtgraph offered an equivalent? Please share!
@waeiski #pyqtgraph that is if you want/need high performance and/or interactivity with your plots. Disclaimer, I’m a maintainer. Happy to answer questions about it.
Can’t speak to matplotlib here, but for examples of high performance usage in #pyqtgraph just look at the benchmark section of of the examples.
With respect to images, different numpy dtypes, row/column major data. the use (or lack of use) of LUTs, availability of cupy or numba can yield vastly different results. Hard to make a good case for best performance here as users would likely have constraints that won’t conform to the best case benchmark.
@ogi @poleguy This is exactly my experience as well.
I think #pyqtgraph would also have better integration into an app because it is literally in the Qt widget hierarchy in a way that #matplotlib is not in any particular widget hierarchy.