File tree 3 files changed +25
-1
lines changed
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 2
2
`plotly_express` is a terse, consistent, high-level wrapper around `plotly` for rapid \
3
3
data exploration and figure generation. See the gallery at https://plotly.github.io/plotly_express
4
4
"""
5
+ from __future__ import absolute_import
6
+ from plotly import optional_imports
7
+
8
+ pd = optional_imports .get_module ("pandas" )
9
+ if pd is None :
10
+ raise ImportError (
11
+ """\
12
+ Plotly express requires pandas to be installed."""
13
+ )
14
+
5
15
6
16
from ._chart_types import ( # noqa: F401
7
17
scatter ,
Original file line number Diff line number Diff line change 24
24
from plotly .figure_factory ._scatterplot import create_scatterplotmatrix
25
25
from plotly .figure_factory ._streamline import create_streamline
26
26
from plotly .figure_factory ._table import create_table
27
- from plotly .figure_factory ._ternary_contour import create_ternary_contour
28
27
from plotly .figure_factory ._trisurf import create_trisurf
29
28
from plotly .figure_factory ._violin import create_violin
30
29
31
30
if optional_imports .get_module ("pandas" ) is not None :
32
31
from plotly .figure_factory ._county_choropleth import create_choropleth
32
+ else :
33
+
34
+ def create_choropleth (* args , ** kwargs ):
35
+ raise ImportError ("Please install pandas to use `create_choropleth`" )
36
+
37
+
38
+ if optional_imports .get_module ("skimage" ) is not None :
39
+ from plotly .figure_factory ._ternary_contour import create_ternary_contour
40
+ else :
41
+
42
+ def create_ternary_contour (* args , ** kwargs ):
43
+ raise ImportError ("Please install scikit-image to use `create_ternary_contour`" )
44
+
33
45
34
46
__all__ = [
35
47
"create_2d_density" ,
36
48
"create_annotated_heatmap" ,
37
49
"create_bullet" ,
38
50
"create_candlestick" ,
51
+ "create_choropleth" ,
39
52
"create_dendrogram" ,
40
53
"create_distplot" ,
41
54
"create_facet_grid" ,
Original file line number Diff line number Diff line change 74
74
optional: pillow ==5.2.0
75
75
optional: matplotlib ==2.2.3
76
76
optional: xarray ==0.10.9
77
+ optional: pywavelets ==1.0.3
77
78
optional: scikit-image ==0.14.4
78
79
79
80
; CORE ENVIRONMENTS
You can’t perform that action at this time.
0 commit comments