6
6
from collections import OrderedDict
7
7
8
8
from plotly import exceptions
9
+ from plotly .graph_objs import graph_objs
9
10
from plotly .tools import (_numpy_imported , _scipy_imported ,
10
11
_scipy__spatial_imported ,
11
12
_scipy__cluster__hierarchy_imported )
@@ -274,8 +275,6 @@ def create_quiver(x, y, u, v, scale=.1, arrow_scale=.3,
274
275
py.plot(fig, filename='quiver')
275
276
```
276
277
"""
277
- # TODO: protected until #282
278
- from plotly .graph_objs import graph_objs
279
278
FigureFactory ._validate_equal_length (x , y , u , v )
280
279
FigureFactory ._validate_positive_scalars (arrow_scale = arrow_scale ,
281
280
scale = scale )
@@ -377,8 +376,6 @@ def create_streamline(x, y, u, v,
377
376
py.plot(fig, filename='streamline')
378
377
```
379
378
"""
380
- # TODO: protected until #282
381
- from plotly .graph_objs import graph_objs
382
379
FigureFactory ._validate_equal_length (x , y )
383
380
FigureFactory ._validate_equal_length (u , v )
384
381
FigureFactory ._validate_streamline (x , y )
@@ -605,8 +602,6 @@ def create_ohlc(open, high, low, close,
605
602
py.iplot(fig, filename='finance/simple-ohlc', validate=False)
606
603
```
607
604
"""
608
- # TODO: protected until #282
609
- from plotly .graph_objs import graph_objs
610
605
if dates is not None :
611
606
FigureFactory ._validate_equal_length (open , high , low , close , dates )
612
607
else :
@@ -837,8 +832,6 @@ def create_candlestick(open, high, low, close,
837
832
py.iplot(fig, filename='finance/simple-candlestick', validate=False)
838
833
```
839
834
"""
840
- # TODO: protected until #282
841
- from plotly .graph_objs import graph_objs
842
835
if dates is not None :
843
836
FigureFactory ._validate_equal_length (open , high , low , close , dates )
844
837
else :
@@ -982,8 +975,6 @@ def create_distplot(hist_data, group_labels,
982
975
validate=False)
983
976
```
984
977
"""
985
- # TODO: protected until #282
986
- from plotly .graph_objs import graph_objs
987
978
FigureFactory ._validate_distplot (hist_data , curve_type )
988
979
FigureFactory ._validate_equal_length (hist_data , group_labels )
989
980
@@ -1831,8 +1822,6 @@ class _Dendrogram(FigureFactory):
1831
1822
1832
1823
def __init__ (self , X , orientation = 'bottom' , labels = None , colorscale = None ,
1833
1824
width = "100%" , height = "100%" , xaxis = 'xaxis' , yaxis = 'yaxis' ):
1834
- # TODO: protected until #282
1835
- from plotly .graph_objs import graph_objs
1836
1825
self .orientation = orientation
1837
1826
self .labels = labels
1838
1827
self .xaxis = xaxis
@@ -1979,8 +1968,6 @@ def get_dendrogram_traces(self, X, colorscale):
1979
1968
(e) P['leaves']: left-to-right traversal of the leaves
1980
1969
1981
1970
"""
1982
- # TODO: protected until #282
1983
- from plotly .graph_objs import graph_objs
1984
1971
d = scs .distance .pdist (X )
1985
1972
Z = sch .linkage (d , method = 'complete' )
1986
1973
P = sch .dendrogram (Z , orientation = self .orientation ,
@@ -1993,7 +1980,6 @@ def get_dendrogram_traces(self, X, colorscale):
1993
1980
colors = self .get_color_dict (colorscale )
1994
1981
1995
1982
trace_list = []
1996
-
1997
1983
for i in range (len (icoord )):
1998
1984
# xs and ys are arrays of 4 points that make up the '∩' shapes
1999
1985
# of the dendrogram tree
0 commit comments