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

Log transform on geom_bar() silently omits layer #2147

Closed
krlmlr opened this issue May 29, 2017 · 3 comments
Closed

Log transform on geom_bar() silently omits layer #2147

krlmlr opened this issue May 29, 2017 · 3 comments

Comments

@krlmlr
Copy link
Member

@krlmlr krlmlr commented May 29, 2017

After some thinking, geom_bar() cannot work with coord_trans(y = "log10") (#420 (comment)). An error message (or a warning) would be great, though.

library(tidyverse, quietly = TRUE)
diamonds %>% ggplot() + geom_bar(aes(x = cut)) + coord_trans(y = "sqrt")

diamonds %>% ggplot() + geom_bar(aes(x = cut)) + coord_trans(y = "log10")

@has2k1
Copy link
Contributor

@has2k1 has2k1 commented May 29, 2017

I think there is a divide-by-zero in there somewhere that leads to infinite coordinate axes.

@hadley
Copy link
Member

@hadley hadley commented Jun 13, 2017

log(0) becomes -Inf, but this should generate a warning or error somewhere.

foo-bar-baz-qux added a commit to foo-bar-baz-qux/ggplot2 that referenced this issue Jul 16, 2017
foo-bar-baz-qux added a commit to foo-bar-baz-qux/ggplot2 that referenced this issue Jul 21, 2017
karawoo added a commit that referenced this issue Jul 25, 2017
…nite (#2147) (#2210)

* `coord_trans()` now generates a warning when a transformation results in x or y values being non-finite (#2147).

* Add NEWS.md item for new `coord_trans()` warning.
@karawoo
Copy link
Member

@karawoo karawoo commented Jul 25, 2017

Closed in #2210

@karawoo karawoo closed this Jul 25, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants