-
-
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
|
@Kully @cldougl @theengineear @empet |
@@ -4019,7 +4019,7 @@ def create_candlestick(open, high, low, close, | |||
@staticmethod | |||
def create_distplot(hist_data, group_labels, | |||
bin_size=1., curve_type='kde', | |||
colors=[], rug_text=[], | |||
colors=[], rug_text=[], histnorm='probability', |
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)
@yankev The seaborn distplot is equivalent to plotly distplot corresponding to |
@yankev Here is the proof that seaborn distplot works like Plotly distplot with |
@empet oh I see, thanks. Initially I was trying to keep some backwards compatibility, but it appears as though setting |
@yankev Yes, this is the recommended default value for histnorm in distplot. |
@@ -5108,7 +5111,9 @@ def make_kde(self): | |||
self.curve_y[index] = (scipy.stats.gaussian_kde | |||
(self.hist_data[index]) | |||
(self.curve_x[index])) | |||
self.curve_y[index] *= self.bin_size[index] | |||
|
|||
if self.histnorm == 'probability': |
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 |
Fixes issue #459
