Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2c1f18

Browse files
committed
changed histnorm to prob-density and adjusted both types of curves
1 parent eaa2169 commit c2c1f18

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

plotly/tools.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5081,7 +5081,7 @@ def make_hist(self):
50815081
x=self.hist_data[index],
50825082
xaxis='x1',
50835083
yaxis='y1',
5084-
histnorm='probability',
5084+
histnorm='probability density',
50855085
name=self.group_labels[index],
50865086
legendgroup=self.group_labels[index],
50875087
marker=dict(color=self.colors[index]),
@@ -5108,7 +5108,7 @@ def make_kde(self):
51085108
self.curve_y[index] = (scipy.stats.gaussian_kde
51095109
(self.hist_data[index])
51105110
(self.curve_x[index]))
5111-
self.curve_y[index] *= self.bin_size[index]
5111+
# self.curve_y[index] *= self.bin_size[index]
51125112

51135113
for index in range(self.trace_number):
51145114
curve[index] = dict(type='scatter',
@@ -5143,7 +5143,7 @@ def make_normal(self):
51435143
/ 500 for x in range(500)]
51445144
self.curve_y[index] = scipy.stats.norm.pdf(
51455145
self.curve_x[index], loc=mean[index], scale=sd[index])
5146-
self.curve_y[index] *= self.bin_size[index]
5146+
# self.curve_y[index] *= self.bin_size[index]
51475147

51485148
for index in range(self.trace_number):
51495149
curve[index] = dict(type='scatter',
@@ -5621,4 +5621,3 @@ def make_table_annotations(self):
56215621
font=dict(color=font_color),
56225622
showarrow=False))
56235623
return annotations
5624-

0 commit comments

Comments
 (0)