Skip to content

Conversation

@ilan-gold
Copy link
Contributor

@ilan-gold ilan-gold commented Oct 29, 2025

Despite the title of the corresponding issue, I took

at first I thought it was a matter of using standard_scale="group"

to mean that scaling was not the problem.

But it turns that that is indeed broken and actually both scaling methods were broken with swapped axes for a very explainable reason - the scaling operation was happening on the wrong axis when the axis was swapped because it was fixed. Group scaling always happened on axis 0, for example, even though the group could be on axis 1 when the axes are swapped.

If you run the test suite on main without the changes, there should be errors for only the two swapped axes tests. Arguably the tests should be pared down, but parametrizing is free and easy. Happy to remove the extra ones.

@ilan-gold ilan-gold added this to the 1.11.6 milestone Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.57%. Comparing base (ae93ac7) to head (3496f18).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3851   +/-   ##
=======================================
  Coverage   76.56%   76.57%           
=======================================
  Files         115      115           
  Lines       12402    12406    +4     
=======================================
+ Hits         9496     9500    +4     
  Misses       2906     2906           
Files with missing lines Coverage Δ
src/scanpy/plotting/_dotplot.py 93.48% <100.00%> (+0.10%) ⬆️

Copy link
Member

@flying-sheep flying-sheep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely!

@ilan-gold ilan-gold merged commit 10f0ce3 into main Oct 30, 2025
13 of 14 checks passed
@ilan-gold ilan-gold deleted the ig/fix_dotplot_scaling branch October 30, 2025 11:40
meeseeksmachine pushed a commit to meeseeksmachine/scanpy that referenced this pull request Oct 30, 2025
ilan-gold added a commit that referenced this pull request Oct 31, 2025
… axes) (#3856)

Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
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.

Dotplot scaling with swapped axes

3 participants