Fix geom_ribbon outlines under non-linear coordinate systems - #1107
Merged
Conversation
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.
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_ribbon.draw_grouptransformed and munched its data, then handed that transformed dataframe togeom_path.draw_group, which transformed it a second time. This 2nd transformation was essentially a noop undercoord_cartesian, but not any other coordinate system that actually transformed its data e.g.coord_trans(y="sqrt").