You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(labels): robust side-by-side legends via draw-event repositioning
A legend is a fixed-pixel artist, so its axes-fraction footprint shifts whenever
the axes is rescaled (constrained_layout, or a figure resize) — placing it once
is unstable and overlaps/squashes. Mirror what colorbars get for free from their
self-rescaling insets: recompute the side-by-side offsets on every draw via a
draw_event callback, measuring each legend at the geometry actually rendered.
Lone legends stay untitled in scanpy's default spot; 2+ are titled by their color
column and laid left-to-right. Revert the single-legend baselines (unchanged now)
to base; only the two two-element shapes plots change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments