|
28 | 28 | 'rgb(227, 119, 194)', 'rgb(127, 127, 127)',
|
29 | 29 | 'rgb(188, 189, 34)', 'rgb(23, 190, 207)']
|
30 | 30 |
|
| 31 | +DEFAULT_HISTNORM = 'probability density' |
| 32 | +ALTERNATIVE_HISTNORM = 'probability' |
| 33 | + |
31 | 34 |
|
32 | 35 | # Warning format
|
33 | 36 | def warning_on_one_line(message, category, filename, lineno,
|
@@ -4019,7 +4022,7 @@ def create_candlestick(open, high, low, close,
|
4019 | 4022 | @staticmethod
|
4020 | 4023 | def create_distplot(hist_data, group_labels,
|
4021 | 4024 | bin_size=1., curve_type='kde',
|
4022 |
| - colors=[], rug_text=[], histnorm='probability density', |
| 4025 | + colors=[], rug_text=[], histnorm=DEFAULT_HISTNORM, |
4023 | 4026 | show_hist=True, show_curve=True,
|
4024 | 4027 | show_rug=True):
|
4025 | 4028 | """
|
@@ -5112,7 +5115,7 @@ def make_kde(self):
|
5112 | 5115 | (self.hist_data[index])
|
5113 | 5116 | (self.curve_x[index]))
|
5114 | 5117 |
|
5115 |
| - if self.histnorm == 'probability': |
| 5118 | + if self.histnorm == ALTERNATIVE_HISTNORM: |
5116 | 5119 | self.curve_y[index] *= self.bin_size[index]
|
5117 | 5120 |
|
5118 | 5121 | for index in range(self.trace_number):
|
@@ -5149,7 +5152,7 @@ def make_normal(self):
|
5149 | 5152 | self.curve_y[index] = scipy.stats.norm.pdf(
|
5150 | 5153 | self.curve_x[index], loc=mean[index], scale=sd[index])
|
5151 | 5154 |
|
5152 |
| - if self.histnorm == 'probability': |
| 5155 | + if self.histnorm == ALTERNATIVE_HISTNORM: |
5153 | 5156 | self.curve_y[index] *= self.bin_size[index]
|
5154 | 5157 |
|
5155 | 5158 | for index in range(self.trace_number):
|
|
0 commit comments