Skip to content

Fix geom_ribbon outlines under non-linear coordinate systems - #1107

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

Fix geom_ribbon outlines under non-linear coordinate systems#1107
has2k1 merged 6 commits into
mainfrom
fix-ribbon-outline-transform

Conversation

@has2k1

@has2k1 has2k1 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

geom_ribbon.draw_group transformed and munched its data, then handed that transformed dataframe to geom_path.draw_group, which transformed it a second time. This 2nd transformation was essentially a noop under coord_cartesian, but not any other coordinate system that actually transformed its data e.g. coord_trans(y="sqrt").

has2k1 added 6 commits August 14, 2026 00:25
Draw paths from data that is already in panel coordinates. Pass the constant-aesthetics decision explicitly so callers can draw a path without applying the coordinate transformation again.
Ribbon data is already in panel coordinates when its upper and lower outlines are drawn. Draw those outlines directly so non-linear coordinate systems keep each line on the corresponding edge of the ribbon.
Coordinate munching requires both `x` and `y`. Derive either missing position from the corresponding upper bound even when `outline_type="full"`, so ribbons with full outlines render under non-linear coordinates.
Document that path drawing stores the computed line width on its input so arrowheads use the same width. Explain that each ribbon outline is one path because each draw receives one ribbon group.
Render all four outline types with a square-root y transformation. The baseline verifies that each outline follows the corresponding ribbon edge after the coordinate transformation.
Record that ribbon and area outlines now follow their transformed boundaries for every outline type.
@has2k1
has2k1 merged commit c2592f6 into main Aug 14, 2026
14 checks passed
@has2k1
has2k1 deleted the fix-ribbon-outline-transform branch August 14, 2026 11:48
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