Skip to content

[MNT] temporary fix for yellowbrick incompatibility with matplotlib >= 3.11 - #55

Open
siddharth7113 wants to merge 2 commits into
sktime:mainfrom
siddharth7113:mnt/issue-49-matplotlib-upgrade
Open

[MNT] temporary fix for yellowbrick incompatibility with matplotlib >= 3.11#55
siddharth7113 wants to merge 2 commits into
sktime:mainfrom
siddharth7113:mnt/issue-49-matplotlib-upgrade

Conversation

@siddharth7113

Copy link
Copy Markdown
Contributor

Temporary fix for #49.

  • matplotlib 3.11 removed matplotlib.cm.get_cmap, which yellowbrick still calls (yellowbrick.style.colors, yellowbrick.features.base). This restores the alias in pycaret.internal.patches.yellowbrick.
  • raises the matplotlib upper bound to <3.12. The old <3.8 cap for py<3.13 was for the cooks plot, which remains via the existing NotImplementedError on matplotlib >= 3.8.

Verified locally: full plotting suite (22 tests) passes with matplotlib 3.11.1 forced. Note that CI's [full] env still resolves matplotlib to 3.10.0 because ydata-profiling caps matplotlib<=3.10, so 3.11 is only reachable in core installs.
Heads-up for the follow-up: yellowbrick also uses ListedColormap(N=...), deprecated since matplotlib 3.11 and scheduled for removal in 3.13.

…= 3.11

Restores matplotlib.cm.get_cmap (removed in matplotlib 3.11, still called
by yellowbrick) in pycaret.internal.patches.yellowbrick, no-op on older
matplotlib. Raises the matplotlib upper bound to <3.12; the cooks plot
remains guarded on matplotlib >= 3.8.

@fkiraly fkiraly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix modifies the runtime environment and hence will be prone to side effects.

I think this should not be done. If we do this, it should at most be a localized monkeypatch that does not impact use of matplotlib outside the call locus.

@siddharth7113

Copy link
Copy Markdown
Contributor Author

This fix modifies the runtime environment and hence will be prone to side effects.

I think this should not be done. If we do this, it should at most be a localized monkeypatch that does not impact use of matplotlib outside the call locus.

Yeah, make sense, would make the edits.

@siddharth7113

Copy link
Copy Markdown
Contributor Author

I don't know how , but I am overjoyed by the fact that CI and tests are passing. :)

@siddharth7113
siddharth7113 requested a review from fkiraly August 13, 2026 09:58
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.

2 participants