Skip to content

Use matplotlylib in mpl_to_plotly when installed, warn otherwise - #5929

Open
robertoffmoura wants to merge 1 commit into
plotly:mainfrom
robertoffmoura:rm/deprecate-bundled-matplotlylib
Open

robertoffmoura wants to merge 1 commit into
plotly:mainfrom
robertoffmoura:rm/deprecate-bundled-matplotlylib

Conversation

@robertoffmoura

Copy link
Copy Markdown
Contributor

The matplotlib converter is moving to the separate matplotlylib package (https://github.com/plotly/matplotlylib). plotly.tools.mpl_to_plotly, and the plotly.offline functions plot_mpl, iplot_mpl and enable_mpl_offline that call it, now emit a FutureWarning when matplotlylib is not importable, asking users to install it and import mpl_to_plotly from it. The bundled converter still does the conversion when matplotlylib is not importable.

The matplotlib converter is moving to the separate matplotlylib package (https://github.com/plotly/matplotlylib). When matplotlylib is importable, plotly.tools.mpl_to_plotly returns matplotlylib.mpl_to_plotly(fig, resize, strip_style, verbose), so plot_mpl, iplot_mpl and enable_mpl_offline, which call it, use the new package too. Otherwise it emits a FutureWarning asking users to install matplotlylib and import mpl_to_plotly from it, and converts with the bundled copy.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant