File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 22`plotly_express` is a terse, consistent, high-level wrapper around `plotly` for rapid \
33 data exploration and figure generation. See the gallery at https://plotly.github.io/plotly_express
44"""
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+
515
616from ._chart_types import ( # noqa: F401
717 scatter ,
Original file line number Diff line number Diff line change 2424from plotly .figure_factory ._scatterplot import create_scatterplotmatrix
2525from plotly .figure_factory ._streamline import create_streamline
2626from plotly .figure_factory ._table import create_table
27- from plotly .figure_factory ._ternary_contour import create_ternary_contour
2827from plotly .figure_factory ._trisurf import create_trisurf
2928from plotly .figure_factory ._violin import create_violin
3029
3130if optional_imports .get_module ("pandas" ) is not None :
3231 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+
3345
3446__all__ = [
3547 "create_2d_density" ,
3648 "create_annotated_heatmap" ,
3749 "create_bullet" ,
3850 "create_candlestick" ,
51+ "create_choropleth" ,
3952 "create_dendrogram" ,
4053 "create_distplot" ,
4154 "create_facet_grid" ,
Original file line number Diff line number Diff line change 7474 optional: pillow ==5.2.0
7575 optional: matplotlib ==2.2.3
7676 optional: xarray ==0.10.9
77+ optional: pywavelets ==1.0.3
7778 optional: scikit-image ==0.14.4
7879
7980; CORE ENVIRONMENTS
You can’t perform that action at this time.
0 commit comments