-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Distplot fix #473
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
Distplot fix #473
Conversation
- Going to include a keyword argument to swap between the new way (where histnorm = 'probability density'), and the original (histnorm = 'probability')
- Need to add new tests for this functionality
@Kully @cldougl @theengineear @empet
Added an extra parameter called histnorm to deal with the two different types of distplots (the seaborn-like method/the original and probability density method)
I've kept the default for histnorm as probability for backwards compatibility.
plotly/tools.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yankev can you add that param to the docstring as well (so around line 4039)
empet
commented
May 25, 2016
@yankev The seaborn distplot is equivalent to plotly distplot corresponding to histnorm=probability density. Leaving the default as probability it's not a good idea because a lot of plots on Plotly cloud used wrong this key and people that take as examples these older plots can think that this version leads to a histogram comparable with an estimate of the probbaility density associated to data.
@yankev Here is the proof that seaborn distplot works like Plotly distplot with histnorm=probability density (see the last plot):http://nbviewer.jupyter.org/gist/empet/1bf38aea056f1d60481e600fc68c21be?flush_cache=true
@empet oh I see, thanks. Initially I was trying to keep some backwards compatibility, but it appears as though setting histnorm = 'probability density' is the correct approach.
empet
commented
May 26, 2016
@yankev Yes, this is the recommended default value for histnorm in distplot.
plotly/tools.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pull these into constants at the top of the file? Hard-coded things like this always raise 🚨's for me.
@yankev tests look great, thanks for adding those! 💃 me after pulling those histnorm values out into some constants somewhere!
Fixes issue #459
screen shot 2016年05月20日 at 2 45 18 pm