Skip to content

Drop empty annotation rows from plot_da_beeswarm - #1078

Open
Zethson wants to merge 1 commit into
mainfrom
fix/beeswarm-empty-categories
Open

Drop empty annotation rows from plot_da_beeswarm#1078
Zethson wants to merge 1 commit into
mainfrom
fix/beeswarm-empty-categories

Conversation

@Zethson

@Zethson Zethson commented Aug 13, 2026

Copy link
Copy Markdown
Member

Closes #1076.

The row order was derived from nhood_adata.obs before the "nan" annotations were filtered out and with the pandas default of observed=False, so annotation categories without any neighbourhood were drawn as empty rows.
The order now comes from the plotted frame with observed=True, which also makes the plot independent of the pandas version -- the default flipped to True in pandas 3.0, so this only shows up for users on pandas 2.

@codecov-commenter

codecov-commenter commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.45%. Comparing base (0c429c5) to head (8944ed1).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1078      +/-   ##
==========================================
- Coverage   79.46%   79.45%   -0.02%     
==========================================
  Files          53       53              
  Lines        7545     7546       +1     
==========================================
  Hits         5996     5996              
- Misses       1549     1550       +1     
Files with missing lines Coverage Δ
src/pertpy/tools/_milo.py 78.24% <ø> (ø)

... and 1 file with indirect coverage changes

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

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.

milo.plot_da_beeswarm(mdata, alpha=0.1) error

2 participants