-
Notifications
You must be signed in to change notification settings - Fork 47
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
Enable jitter in paired slopegraph plots to aid discrete data visualisations. #181
Comments
Hi @mlotinga ! For our unpaired plots our design approach is that we would like each data point to be clear and non-overlapping. For this reason, we use the same approach as the seaborn 'swarmplot' which aims to not overlap data points. This is why it (and swarmplot) do not include jitter as a parameter. These plots do, however, end up overlapping data points once they run out of space and hit the 'gutter'. We are currently working on tuning this gutter length. Users can also adjust the dot size which helps a lot for larger sample sizes. For paired lines it is more challenging (design wise). Perhaps you could elaborate a little further and/or show a seaborn example for the use of jitter in paired line plots? |
Ok, thanks for responding. Yes, the issue here is related to paired slopegraph plots only — the illustration in the original post shows how it can be rather difficult to discern meaning from this if the data are discrete. With regard to seaborn, in the API there is the https://seaborn.pydata.org/generated/seaborn.objects.Jitter.html |
Thanks @Jacobluke- and @JAnns98 for the information. I now have it working. I added the following (lines 1009-1011)
I modified plotter.py with (line 484)
and (lines 493-494)
and I get output like (using |
Would this be a useful feature to add to the package? My edits can be viewed here: https://github.com/mlotinga/DABEST-python_devMJBL |
Thats great, glad you could get it done! We will discuss internally whether it could be useful to include in the next release :) P.s. I would think only x-axis jitter would be appropriate? |
I guess it depends on the application and data - I think it's good to have the flexibility. |
@mlotinga Thanks for this, we will aim to add it into the main package (at least the x-jitter) for the next major release! |
|
For discrete data, the data plots generally overlay points or lines over each other, obscuring information.
A facility to add jitter to the data visualisation, without affecting the effect size calculations, would be a standard way to address this, as is implemented (for example) in seaborn.
Applying jitter to the input data is possible but would distort the effect size calculation, which is highly undesirable.
If you could give some advice on where this could be incorporated into the relevant objects, I could have a go at doing it.
Example of the motivating problem:
The text was updated successfully, but these errors were encountered: