8000 Return `Figure`, not `dict`. · plotly/plotly.py@dced8ed · GitHub
[go: up one dir, main page]

Skip to content

Commit dced8ed

Browse files
committed
Return Figure, not dict.
1 parent 3311acb commit dced8ed

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

plotly/tools.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ def create_quiver(x, y, u, v, scale=.1, arrow_scale=.3,
16511651
data = [quiver]
16521652
layout = graph_objs.Layout(hovermode='closest')
16531653

1654-
return dict(data=data, layout=layout)
1654+
return graph_objs.Figure(data=data, layout=layout)
16551655

16561656
@staticmethod
16571657
def create_streamline(x, y, u, v,
@@ -1759,7 +1759,7 @@ def create_streamline(x, y, u, v,
17591759
data = [streamline]
17601760
layout = graph_objs.Layout(hovermode='closest')
17611761

1762-
return dict(data=data, layout=layout)
1762+
return graph_objs.Figure(data=data, layout=layout)
17631763

17641764
@staticmethod
17651765
def _make_increasing_ohlc(open, high, low, close, dates, **kwargs):
@@ -1996,7 +1996,7 @@ def create_ohlc(open, high, low, close,
19961996
layout = graph_objs.Layout(xaxis=dict(zeroline=False),
19971997
hovermode='closest')
19981998

1999-
return dict(data=data, layout=layout)
1999+
return graph_objs.Figure(data=data, layout=layout)
20002000

20012001
@staticmethod
20022002
def _make_increasing_candle(open, high, low, close, dates, **kwargs):
@@ -2222,7 +2222,7 @@ def create_candlestick(open, high, low, close,
22222222
data = candle_incr_data + candle_decr_data
22232223

22242224
layout = graph_objs.Layout()
2225-
return dict(data=data, layout=layout)
2225+
return graph_objs.Figure(data=data, layout=layout)
22262226

22272227
@staticmethod
22282228
def create_distplot(hist_data, group_labels,
@@ -2402,9 +2402,7 @@ def create_distplot(hist_data, group_labels,
24022402
position=0.0))
24032403

24042404
data = sum(data, [])
2405-
dist_fig = dict(data=data, layout=layout)
2406-
2407-
return dist_fig
2405+
return graph_objs.Figure(data=data, layout=layout)
24082406

24092407

24102408
class _Quiver(FigureFactory):

0 commit comments

Comments
 (0)
0