Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CI Unpin matplotlib<3.9 in doc build #29434

Copy link
Copy link
Closed
@lesteve

Description

@lesteve
Issue body actions

In #29388 we pinned matplotlib<3.9 see in particular #29388 (comment).

This is a DeprecationWarning in matplotlib 3.9 turned into error in the CI:

matplotlib._api.deprecation.MatplotlibDeprecationWarning: The 'labels' parameter of boxplot() has been renamed 'tick_labels' since Matplotlib 3.9; support for the old name will be dropped in 3.11.

3 examples fail (DeprecationWarning turned into error): they have been fixed in #29471.

  • examples/inspection/plot_permutation_importance_multicollinear.py
  • examples/ensemble/plot_gradient_boosting_regression.py
  • examples/release_highlights/plot_release_highlights_0_22_0.py

See build log from one of the commit in this #29388.

The easiest work-around is likely to do some version comparison something like this (not tested):

from sklearn.utils.fixes import parse_version
import matplotlib

tick_labels = ...
# labels has been renamed to tick_labels in matplotlib 3.9. This code can be simplified when scikit-learn minimum supported version is 3.9
tick_labels_parameter_name = "tick_labels" if parse_version(matplotlib.__version__) >= parse_version("3.9") else "labels"
tick_labels_dict = {tick_labels_parameter_name: tick_labels}

plt.boxplot(..., **tick_labels_dict)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.