Skip to content

Ordering of traces is still wrong #2136

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

Open
travis-leith opened this issue May 12, 2022 · 0 comments
Open

Ordering of traces is still wrong #2136

travis-leith opened this issue May 12, 2022 · 0 comments

Comments

@travis-leith
Copy link

Following on from #225, here is an an example where ordering of traces is wrong

set.seed(12345)

df1 = data.frame(
  x = seq(1, 200), y = 100 + cumsum(rnorm(200))
)

y.sparse = local({
  i = sample(200, 10)
  res = rep(0, 200)
  res[i] = 120 + cumsum(rnorm(10))
  res
})

df2 = data.frame(
  x = seq(1, 200), y = y.sparse
)

p = ggplot(mapping = aes(x = x, y = y)) +
  geom_area(data = df1) + 
  geom_col(data = df2, fill = "red")

p

ggplotly(p)

image

image

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

1 participant