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

How to jitter x-values while maintaining categorical axis like seaborn swarmplot? #1057

Closed
gh-owestesson opened this issue Jul 30, 2018 · 3 comments
Labels
question vega: vega-lite Requires upstream action in `vega-lite`

Comments

@gh-owestesson
Copy link

Is it possible to make a seaborn-style 'swarmplot' in Altair? I like being able to see all points for a given category, but I'm not sure how to vary the axis values without losing the categorical labeling.

The stripplot documented here is close, but I'd like to vary the categorical axis values just enough so that points don't overlap:
https://altair-viz.github.io/gallery/strip_plot.html

https://seaborn.pydata.org/generated/seaborn.swarmplot.html

@jakevdp
Copy link
Collaborator

jakevdp commented Jul 30, 2018

No, that's not yet supported in Altair/Vega-Lite. There is some discussion of adding this feature at vega/vega-lite#396

@jakevdp jakevdp added question vega: vega-lite Requires upstream action in `vega-lite` labels Aug 9, 2018
@jakevdp
Copy link
Collaborator

jakevdp commented May 27, 2019

While not yet fully supported by the vega-lite grammar, you can do something like this with calculate transforms. An example was recently submitted for the gallery here: https://github.com/altair-viz/altair/blob/master/altair/examples/stripplot.py

@jakevdp jakevdp closed this as completed May 27, 2019
@markusschanta
Copy link

While not yet fully supported by the vega-lite grammar, you can do something like this with calculate transforms. An example was recently submitted for the gallery here: https://github.com/altair-viz/altair/blob/master/altair/examples/stripplot.py

The example cited above seems to have moved. Looks like this is the new URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question vega: vega-lite Requires upstream action in `vega-lite`
Projects
None yet
Development

No branches or pull requests

3 participants