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 axes limits when plotting #294

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Update axes limits when plotting #294

merged 2 commits into from
Jan 15, 2024

Conversation

thorstenwagner
Copy link
Collaborator

I noticed that when switching between layers, the axis limits of the plots are not updated properly. This is due to reset_zoom being called with old axis limits. This PR fixes the problem.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (db9aea7) 77.33% compared to head (f9a10a8) 77.30%.

Files Patch % Lines
napari_clusters_plotter/_Qt_code.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #294      +/-   ##
==========================================
- Coverage   77.33%   77.30%   -0.03%     
==========================================
  Files          16       16              
  Lines        1897     1899       +2     
==========================================
+ Hits         1467     1468       +1     
- Misses        430      431       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Cryaaa
Copy link
Collaborator

Cryaaa commented Jan 11, 2024

Hey @thorstenwagner,
Is this also a problem for other plotting types like 1D Histograms and scatterplots? If so should we maybe add the line to the other functions too? Apart from that thanks for catching this and the simple fix!

@thorstenwagner
Copy link
Collaborator Author

I don't have a good example for the other plotting types. Especially not one with multiple layers

@thorstenwagner
Copy link
Collaborator Author

I can reproduce the issue with scatter plots

@thorstenwagner
Copy link
Collaborator Author

thorstenwagner commented Jan 15, 2024

Fixed for scatter plots. For histograms I can't reproduce the issue. Seems to work. Ready for merge :-)

@Cryaaa
Copy link
Collaborator

Cryaaa commented Jan 15, 2024

Fixed for scatter plots. For histograms I can't reproduce the issue. Seems to work. Ready for merge :-)

Awesome, thanks for checking this and implementing the fix! Everything LGTM

@Cryaaa Cryaaa merged commit 19cdf25 into main Jan 15, 2024
8 checks passed
@Cryaaa Cryaaa deleted the axes-limit-bugfix branch January 23, 2024 14:04
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.

2 participants