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

Error when using expand_limits() + coord_flip() #1074

Closed
pelotom opened this issue Jul 18, 2017 · 1 comment
Closed

Error when using expand_limits() + coord_flip() #1074

pelotom opened this issue Jul 18, 2017 · 1 comment

Comments

@pelotom
Copy link

pelotom commented Jul 18, 2017

Using expand_limits() in conjunction with coord_flip() causes an error:

p <- ggplot(diamonds[sample(nrow(diamonds), 1000),]) +
    aes(carat, price) +
    geom_point() +
    expand_limits(y = 0) +
    coord_flip()

ggplotly(p)
# Error in if (tr$type != "bar") traces[[i]][c("x", "y")] <- tr[c("y", "x")] : 
#  argument is of length zero
@sanjmeh
Copy link

sanjmeh commented Mar 28, 2018

This issue still persists and not just in expand_limits.

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

No branches or pull requests

2 participants