Fix annotation_logticks and annotation_stripes under non-linear coordinates - #1108
Merged
Conversation
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
geom_rugandgeom_recteach gained a function that draws data already in panelcoordinates, and each annotation calls one of those instead of routing back through a
draw_groupthat transforms the data a second time. The annotation geoms now use these functions and avoid double transformation.