-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Labels
DocumentationMeta-issueGeneral issue associated to an identified list of tasksGeneral issue associated to an identified list of tasksgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted
Description
See in #22547
MatplotlibDeprecationWarning: Axes3D(fig) adding itself to the figure is deprecated since 3.4. Pass the keyword argument auto_add_to_figure=False and use fig.add_axes(ax) to suppress this warning. The default value of auto_add_to_figure will change to False in mpl3.5 and True values will no longer work in 3.6. This is consistent with other Axes classes
We need to replace a line like this:
ax = Axes3D(fig, elev=elev, azim=azim, rect=[0, 0, 0.95, 1])by:
ax = fig.add_subplot(111, projection="3d", elev=elev, azim=azim)
ax.set_position([0, 0, 0.95, 1])For matplotlib < 3.2 (matplotlib 3.1.2 is our minimum supported version of matplotlib) we need to have this import:
# unused but required import for doing 3d projections with matplotlib < 3.2
import mpl_toolkits.mplot3d # noqa: F401see #22594 (comment) for more details.
List of examples affected
through git grep Axes3D examples:
- examples/cluster/plot_cluster_iris.py DOC: get rid of matplotlib DeprecationWarning in plot_cluster_iris.py #22594
- examples/cluster/plot_ward_structured_vs_unstructured.py DOC fix matplotlib warning for plot_ward_structured_vs_unstructured.py #22631
- examples/datasets/plot_iris_dataset.py DOC Fix matplotlib warning for plot_iris_dataset.py #22640
- examples/decomposition/plot_pca_3d.py DOC Fix matplotlib warning for plot_pca_3d.py #22591
- examples/decomposition/plot_pca_iris.py DOC Fix axes3d matplotlib deprecation warning #22622
- examples/inspection/plot_partial_dependence.py EXA: remove deprecation warning for plot_partial_dependence #22654
- examples/manifold/plot_compare_methods.py done as part of DOC use notebook-style and fix matplotlib warning for plot_compare_methods #22679
- examples/manifold/plot_manifold_sphere.py
If you are interested to work on this issue
- mention in a comment which file you want to work on, so that different people can work on this issue in parallel
- open a PR changing only this file
Metadata
Metadata
Assignees
Labels
DocumentationMeta-issueGeneral issue associated to an identified list of tasksGeneral issue associated to an identified list of tasksgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted