Skip to content

stat_ecdf() responds to scale transform #5115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 6, 2023

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5112 and #5113.

Because this stat used to have y = after_stat(y), it computed a column named y. This, of course, is recognised as a position aesthetic, but that also meant that it was back-transformed in scales_backtransform_df() (whereas it shouldn't be). The fix proposed herein is to simply rename the computed aesthetic to ecdf such that it is no longer automatically backtransformed.

@teunbrand teunbrand added this to the ggplot2 3.4.1 milestone Jan 5, 2023
Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - this is in theory a breaking change but I suspect no one will notice

@teunbrand
Copy link
Collaborator Author

Right, yes good observation

@teunbrand teunbrand merged commit 014c5d2 into tidyverse:main Jan 6, 2023
@teunbrand teunbrand deleted the ecdf_scale_transform branch January 6, 2023 19:56
teunbrand added a commit that referenced this pull request Jan 12, 2023
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.

Bug in ggplot2 3.4.0 using scales::probability_trans
2 participants