Skip to content

Fix annotation_logticks and annotation_stripes under non-linear coordinates - #1108

Merged
has2k1 merged 6 commits into
mainfrom
fix-annotation-transform
Aug 14, 2026
Merged

Fix annotation_logticks and annotation_stripes under non-linear coordinates#1108
has2k1 merged 6 commits into
mainfrom
fix-annotation-transform

Conversation

@has2k1

@has2k1 has2k1 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

geom_rug and geom_rect each gained a function that draws data already in panel
coordinates, and each annotation calls one of those instead of routing back through a
draw_group that transforms the data a second time. The annotation geoms now use these functions and avoid double transformation.

has2k1 added 6 commits August 14, 2026 16:30
Move coordinate transformation and side resolution to the geom
boundary. The drawing function now receives panel-coordinate positions
and resolved panel sides.
Move coordinate transformation to the geom boundary. The drawing
function now receives rectangle bounds in panel coordinates.
Log tick positions come from panel ranges, so they already use panel
coordinates. Drawing them through the rug geom transformed those
positions again, which bunched or dropped ticks under non-linear
coordinates. Render them directly instead.
Stripe bounds come from panel breaks and ranges, so they already use
panel coordinates. Drawing them through the rectangle geom transformed
the bounds again and raised an error under non-linear coordinates.
Render them directly instead.
Add visual regressions for log ticks and background stripes under
`coord_trans`. The tests detect any second transformation of positions
derived from panel ranges.
Pass each rug-mark length directly to the renderer instead of storing
it in the geom parameters between draws.

Document that log-tick sides are interpreted before `coord_flip`, and
record the fixes for log ticks and stripes under non-linear coordinates.
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.49123% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.41%. Comparing base (c2592f6) to head (6b5494b).

Files with missing lines Patch % Lines
plotnine/geoms/geom_rug.py 94.11% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1108      +/-   ##
==========================================
- Coverage   87.43%   87.41%   -0.02%     
==========================================
  Files         210      210              
  Lines       14926    14922       -4     
  Branches     1890     1889       -1     
==========================================
- Hits        13050    13044       -6     
- Misses       1300     1301       +1     
- Partials      576      577       +1     

☔ View full report in Codecov by Harness.
📢 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.

@has2k1
has2k1 merged commit 6b5494b into main Aug 14, 2026
13 checks passed
@has2k1
has2k1 deleted the fix-annotation-transform branch August 14, 2026 13:45
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