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

Regression: negative geom_col disappears #6088

Open
olivroy opened this issue Sep 6, 2024 · 1 comment · May be fixed by #6106
Open

Regression: negative geom_col disappears #6088

olivroy opened this issue Sep 6, 2024 · 1 comment · May be fixed by #6106
Labels
bug an unexpected problem or unintended behavior positions 🥇

Comments

@olivroy
Copy link
Contributor

olivroy commented Sep 6, 2024

data.frame(
  x = c(-1, 1),
  y = c("x", "y")
) |> 
  ggplot(aes(x, y)) +
  geom_col()

3.5.1

image

dev
image

@teunbrand
Copy link
Collaborator

Thanks for the report! Seems to be due to #5789, it only occurs with position = "stack".
The following line;

ymax = as.numeric(ifelse(data$ymax == 0, data$ymin, data$ymax))

Causes the 0-width geometry. The early-exit point from #5789 is before the correct geometry is restored.

@teunbrand teunbrand added bug an unexpected problem or unintended behavior positions 🥇 labels Sep 6, 2024
@teunbrand teunbrand linked a pull request Sep 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior positions 🥇
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants