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

Grouped densities are stacked by default instead of sharing the same baseline #9170

Open
joelostblom opened this issue Nov 10, 2023 · 0 comments
Labels

Comments

@joelostblom
Copy link
Contributor

joelostblom commented Nov 10, 2023

In Vega-Lite 5.8 and earlier, grouped densities would share the same baseline:
image

In the latest version of Vega-Lite, they instead stack on top of each other:
image
Open the Chart in the Vega Editor

This stacking behavior is undesirable as a default since it makes the distributions much harder to compare. This is why other packages such as seaborn and ggplot uses a shared baseline by default. Stacking the areas used to require the stack to be explicitly set like in this example.

I am not sure exactly which VL version this was changed in, but the correct behavior was present in Vega-Lite 5.8 (altair 5.0.1). Edit: I think it was in this PR #9018. Above you can also see that the extent of each density is different, and that is due to the bug reported here vega/vega#3815, but I am not sure if the stacking is also related to that same issue and/or possibly #9106

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

1 participant