Repository navigation
Conversation
|
Hmm, the problem is that, when |
Yes that is what I think is happening, though that should only happen in rare cases that I can't recreate outside the example. I tried to test what would happen to cliffs, but they appear to be unaffected in normal circumstances where devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
df <- data.frame(x = c(0, 1, 1, 2, 0, 1, 2),
y = c(1, 1, 2, 2, 1, 1, 1),
grp = rep(c("B", "A"), c(4, 3)))
ggplot(df, aes(x, y, fill = grp)) +
geom_area()Created on 2023-02-05 with reprex v2.0.2 (I'm sorry for accidentally flagging you for review!) |
|
Closing this in favour of #5239 |

This PR aims to fix #5176.
The cause of the issue was that
position_stack()stacked values from the same group at the same x-location because there were duplicated entries in theunique_loccomputed parameter. This PR deduplicates theunique_locso that this stacking bug doesn't occur.Reprex from the issue without/with this PR:
Created on 2023-02-04 with reprex v2.0.2