Skip to content

Commit 7815e59

Browse files
committed
made PR review changes
1 parent 4bb9482 commit 7815e59

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

plotly/tests/test_optional/test_figure_factory.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,12 @@ def test_distplot_more_args(self):
150150
self.assertEqual(dp['data'][1], expected_dp_data_hist_2)
151151

152152
def test_distplot_binsize_array(self):
153-
hist1_x = [0.8, 1.2, 0.2, 0.6, 1.6,
154-
-0.9, -0.07, 1.95, 0.9, -0.2,
153+
hist1_x = [0.8, 1.2, 0.2, 0.6, 1.6, -0.9, -0.07, 1.95, 0.9, -0.2,
155154
-0.5, 0.3, 0.4, -0.37, 0.6]
156-
hist2_x = [0.8, 1.5, 1.5, 0.6, 0.59,
157-
1.0, 0.8, 1.7, 0.5, 0.8,
158-
-0.3, 1.2, 0.56, 0.3, 2.2]
155+
hist2_x = [0.8, 1.5, 1.5, 0.6, 0.59, 1.0, 0.8, 1.7, 0.5, 0.8, -0.3,
156+
1.2, 0.56, 0.3, 2.2]
159157

160-
hist_data = [hist1_x] + [hist2_x]
158+
hist_data = [hist1_x, hist2_x]
161159
group_labels = ['2012', '2013']
162160

163161
dp = tls.FigureFactory.create_distplot(hist_data, group_labels,

plotly/tools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ def create_candlestick(open, high, low, close,
23322332

23332333
@staticmethod
23342334
def create_distplot(hist_data, group_labels,
2335-
bin_size=[1.], curve_type='kde',
2335+
bin_size=1., curve_type='kde',
23362336
colors=[], rug_text=[],
23372337
show_hist=True, show_curve=True,
23382338
show_rug=True):
@@ -2347,7 +2347,8 @@ def create_distplot(hist_data, group_labels,
23472347
:param (list[list]) hist_data: Use list of lists to plot multiple data
23482348
sets on the same plot.
23492349
:param (list[str]) group_labels: Names for each data set.
2350-
:param (list[float]) bin_size: Size of histogram bins. Default = [1.]
2350+
:param (list[float]|float) bin_size: Size of histogram bins.
2351+
Default = 1.
23512352
:param (str) curve_type: 'kde' or 'normal'. Default = 'kde'
23522353
:param (bool) show_hist: Add histogram to distplot? Default = True
23532354
:param (bool) show_curve: Add curve to distplot? Default = True

0 commit comments

Comments
 (0)