Skip to content
Prev Previous commit
Next Next commit
Updated figure factory init
  • Loading branch information
ajlien committed Oct 22, 2025
commit 4d8fbc4bf4d95b392f46c79a7157eddaa17b04e7
9 changes: 8 additions & 1 deletion plotly/figure_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@

if optional_imports.get_module("pandas") is not None:
from plotly.figure_factory._county_choropleth import create_choropleth
from plotly.figure_factory._hexbin_map import create_hexbin_map
from plotly.figure_factory._hexbin_map import (
create_hexbin_map,
create_hexbin_mapbox,
)
else:

def create_choropleth(*args, **kwargs):
Expand All @@ -38,6 +41,9 @@ def create_choropleth(*args, **kwargs):
def create_hexbin_map(*args, **kwargs):
raise ImportError("Please install pandas to use `create_hexbin_map`")

def create_hexbin_mapbox(*args, **kwargs):
raise ImportError("Please install pandas to use `create_hexbin_mapbox`")


if optional_imports.get_module("skimage") is not None:
from plotly.figure_factory._ternary_contour import create_ternary_contour
Expand All @@ -58,6 +64,7 @@ def create_ternary_contour(*args, **kwargs):
"create_facet_grid",
"create_gantt",
"create_hexbin_map",
"create_hexbin_mapbox",
"create_ohlc",
"create_quiver",
"create_scatterplotmatrix",
Expand Down