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

Update PColorMeshItem.py #2327

Merged
merged 1 commit into from Jun 18, 2022
Merged

Update PColorMeshItem.py #2327

merged 1 commit into from Jun 18, 2022

Conversation

LarsVoxen
Copy link
Contributor

self.x and self.y should not be set before detecting if view bounds have changed.
self._prepareData(args) is now called after the view bounds check

self.x and self.y  should not be set before detecting if view bounds have changed. 
self._prepareData(args) is now called after the view bounds check
@j9ac9k
Copy link
Member

j9ac9k commented Jun 18, 2022

Hi @LarsVoxen

Thanks for the PR. I agree with your assessment, but I'm curious what issue you ran into that led you to debug this. Regardless, I'm merging, but I'd be curious to hear more about the specifics of your issue 👍🏻

@j9ac9k j9ac9k merged commit 15a5034 into pyqtgraph:master Jun 18, 2022
@LarsVoxen
Copy link
Contributor Author

Hi @j9ac9k

I have a tool that do live signal analysis of noise and vibration measurement data. I use Pyqtgraph to show results live as we measure.

pcolormesh is used to show a special spectrogram where the spacing is not uniform on the x-axis. It was not updated correctly when new data was measured and added to Mesh in PcolorMesh.

I am and have been a happy user of Pyqtgraph for years. Thanks was merging. Makes we feel like I can contribute I little back to a great and very useful project.

@j9ac9k
Copy link
Member

j9ac9k commented Jun 18, 2022

Ha, several careers and academic programs ago, I did vibration modal analysis and had to write my code in matlab, including some GUI code that is so horrendous I am glad I don't have a copy around anymore.

I wouldn't have thought to use PColorMesh for a spectrogram (most of my recent signal processing work is in analyzing speech), but I can see why it would work well in your use case.

Glad to hear pyqtgraph has worked out for you well for so long. PColorMesh is a relatively new feature to the library; @pijyoi recently did some significant performance overhauls on it as well; hopefully those improvements have been noticeable in your usage.

If your project is open source, or has some kind of public availability, would love for it to be added to the used-by section in the README.

@pijyoi
Copy link
Contributor

pijyoi commented Jun 18, 2022

There's also the NonUniformImage graphicsItem (using drawRect), which appears to have significant overlap with the functionality of PColorMeshItem (using drawConvexPolygon).

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

Successfully merging this pull request may close these issues.

None yet

3 participants