Skip to content

geom_errorbar() issue when number of unique groups = number of labels #424

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
royr2 opened this issue Jan 25, 2016 · 1 comment
Closed
Labels

Comments

@royr2
Copy link

royr2 commented Jan 25, 2016

library(plotly)
set.seed(123)

n = 10
random = rnorm(n)
df = data.frame(x = LETTERS[1:n],
                y = random,
                group1 = LETTERS[1:2],  # No of unique groups < no of labels on x-axis
                group2 = LETTERS[1:n],  # No of unique groups = no of labels on x-axis
                ymin = random + 0.1,
                ymax = random - 0.1)

# Works fine
ggplot(df, aes(x, y, ymin = ymin, ymax = ymax, color = group1)) + geom_point() + geom_errorbar()
ggplotly()

# gggplotly() shows +- NaNs for ymin and ymax
ggplot(df, aes(x, y, ymin = ymin, ymax = ymax, color = group2)) + geom_point() + geom_errorbar()
ggplotly()
@cpsievert
Copy link
Collaborator

Bug confirmed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants