-
Notifications
You must be signed in to change notification settings - Fork 612
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
jittering, offset/nudge, dodge #396
Comments
This would require a random transform in Vega (or at least access to random call in expression) |
A tricky questions is whether Thinking of a few cases. For dodge, this is basically having x-scale as a band scale and dx-scale as another band scale that has a range = For jitter, this is basically having x-scale as a point scale, and dx mapping a random value (say from nudge is simply mapping fixed For these examples, it seems like dx should have its own scale (not sharing with x). However, if we think about stack offset example, we might still want the offset value to share the scale. |
We probably have to think what's the right scale type and range for dx based on x's scale type
|
We will probably implement the mark definition support for now #3328. Note that we can't call them |
We are thinking that we will eventually support offsetX/Y/X2/Y2 as channels so it's something like this.
Another possible model is having
However, this model has a major flaw when using with condition, in the sense that we can no longer enforce that users can only map only one field to "offsetX" -- which will violate current architecture that only allows one field per channel (
Plus, this look super messy. |
The trickiest part of supporting this offset is how to make it work correctly with interval selection. |
Can the x axis be discrete? |
Yes. We need to think this through and prototype different cases. Probably wont get to do that until my thesis is stable lol |
vega/altair#1055 is another use case where offset is useful as an encoding channel so we can do conditional offset. |
I think this is one of a few things that I want to tackle in the next 1-2 months, given group bar is a quite common use case and we don't do it that well yet. |
See http://docs.ggplot2.org/current/geom_jitter.html, http://docs.ggplot2.org/current/position_nudge.html, http://docs.ggplot2.org/current/position_dodge.html for example
The text was updated successfully, but these errors were encountered: