Skip to content

Scales don't squish to zero-range domains - #5279

Merged
teunbrand merged 2 commits into
tidyverse:mainfrom
teunbrand:zero_domain
Apr 21, 2023
Merged

teunbrand merged 2 commits into
tidyverse:mainfrom
teunbrand:zero_domain

Conversation

@teunbrand

Copy link
Copy Markdown
Collaborator

This PR aims to fix #5271.

Briefly, reciprocal_trans()'s domains are [-Inf, Inf]. The reciprocal of this domain is [0,0]. The limits get squished to [0,0]. We cannot compute breaks on this. Hence, in this PR, we refuse to squish limits to zero-range domains.
Moreover, it adds a series of tests for computing breaks with almost all transformd (boxcox is broken though), so we might see better when we might break a particular transfomation.

@thomasp85 thomasp85 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@teunbrand
teunbrand merged commit 76f0812 into tidyverse:main Apr 21, 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.

Reciprocal transformation to continuous scale drops axis

2 participants