Skip to content
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

coord_trans with continuous_scale and minor_breaks = NULL causes error #1422

dbeltoft opened this issue Dec 3, 2015 · 0 comments


Copy link

dbeltoft commented Dec 3, 2015


Noob here, apologize in advance if this is already known, or if I misunderstood a feature as a bug.

When trying to suppress minor breaks on my axis, while applying a coordinate transformation with coord_trans, I get an error. Here is a minimal example to reproduce the error:

data <- data.frame(x = c(1,2,3), y = c(5,2,4))
ggplot(data, aes(x,y)) + 
  geom_point() +
  scale_x_continuous(minor_breaks = NULL) +
  coord_trans(xtrans = "log")                                  # This line causes the error
# Error in log(x, base) : non-numeric argument to mathematical function

Going through the traceback, it seems that transform_value does not check for NULL arguments, which makes it fail when trying to rescale the minor breaks.

@hadley hadley closed this as completed in b4ca516 Dec 12, 2015
@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.
None yet
None yet

No branches or pull requests

1 participant