Skip to content

feat: use shared histogram, instead of single, general feature bump for histograms#267

Merged
tlambert03 merged 45 commits intopyapp-kit:mainfrom
tlambert03:shared-histogram
Apr 1, 2026
Merged

feat: use shared histogram, instead of single, general feature bump for histograms#267
tlambert03 merged 45 commits intopyapp-kit:mainfrom
tlambert03:shared-histogram

Conversation

@tlambert03
Copy link
Copy Markdown
Member

this is a very large WIP PR that refactors the histogram widgets to have all channels on a single plot.

Screen.Recording.2026-03-29.at.10.17.17.AM.mov

We want this for QI, so the goal for now is just to make it do what we want (we'll install from this branch), and i'll delay a full review and cleanup for a few weeks from now. It has a toggle switch to retain the old behavior of having a histogram below each slider. but the default here is a single global histogram

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

❌ Patch coverage is 82.67652% with 211 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.38%. Comparing base (9e52c93) to head (bff1ba3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ndv/views/_vispy/_shared_histogram.py 82.95% 60 Missing ⚠️
src/ndv/views/_wx/_array_view.py 42.66% 43 Missing ⚠️
src/ndv/views/_pygfx/_shared_histogram.py 91.64% 37 Missing ⚠️
src/ndv/views/_qt/_array_view.py 58.18% 23 Missing ⚠️
src/ndv/views/_jupyter/_array_view.py 55.00% 18 Missing ⚠️
src/ndv/views/bases/_graphics/_histogram_utils.py 87.12% 17 Missing ⚠️
src/ndv/views/_app.py 45.45% 6 Missing ⚠️
src/ndv/controllers/_array_viewer.py 95.00% 4 Missing ⚠️
src/ndv/views/_pygfx/_util.py 50.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (82.67%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
- Coverage   85.91%   85.38%   -0.54%     
==========================================
  Files          50       53       +3     
  Lines        5980     7192    +1212     
==========================================
+ Hits         5138     6141    +1003     
- Misses        842     1051     +209     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03
Copy link
Copy Markdown
Member Author

in the last commit, an update was made so that the histograms resample themselves based on zoom level so as to avoid drawing a huge number of (effectively invisible) bins when zoomed out, but showing integer level accuracy when zoomed in. This preserves visual accuracy without tanking performance when looking at the full range:

Screen.Recording.2026-03-31.at.9.11.50.AM.mov

@tlambert03 tlambert03 changed the title Shared histogram [WIP] feat: use shared histogram, instead of single, general feature bump for histograms Mar 31, 2026
@tlambert03 tlambert03 enabled auto-merge (squash) April 1, 2026 22:14
@tlambert03 tlambert03 merged commit 044c817 into pyapp-kit:main Apr 1, 2026
61 checks passed
@tlambert03 tlambert03 deleted the shared-histogram branch April 1, 2026 22:17
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.

1 participant