Skip to content

Automatic setting of breaks with probit scale #871

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

Closed
krlmlr opened this issue Nov 5, 2013 · 1 comment
Closed

Automatic setting of breaks with probit scale #871

krlmlr opened this issue Nov 5, 2013 · 1 comment

Comments

@krlmlr
Copy link
Member

krlmlr commented Nov 5, 2013

Automatic setting of breaks fails with probit scale if there are values
too close to 0 or 1.

Bug

qplot(c(0.25, 8), c(0.03, 0.95)) + scale_y_continuous(trans = "probit")
## Error: 'from' cannot be NA, NaN or infinite

Data-dependent: y values further away from 0 or 1 don't trigger it

qplot(c(0.25, 8), c(0.3, 0.7)) + scale_y_continuous(trans = "probit")

plot of chunk unnamed-chunk-3

Workaround: Set explicit breaks

qplot(c(0.25, 8), c(0.03, 0.95), data = soilSample) + scale_y_continuous(trans = "probit", 
    breaks = seq(0.2, 0.8, 0.2))

plot of chunk unnamed-chunk-4

Bug with explicit breaks

qplot(c(0.25, 8), c(0.03, 0.95)) + scale_y_continuous(trans = "probit", 
    breaks = seq(0, 1, 0.2))
## Error: 'from' cannot be NA, NaN or infinite

See also daqana/tikzDevice@9f381e6

@hadley
Copy link
Member

hadley commented Feb 24, 2014

This sounds like a great feature/horrible bug, but unfortunately we don't currently have the development bandwidth to support it/fix it. If you'd like to submit a pull request that implements this feature/fixes this bug, please follow the instructions in the development vignette.

@hadley hadley closed this as completed Feb 24, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants