Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Remove deprecated Matplotlib stem() parameter - Fixes #1314 #1322

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lwgray
Copy link
Contributor

@lwgray lwgray commented Feb 19, 2025

Description

This PR fixes a TypeError that occurs when using newer versions of Matplotlib
by removing the deprecated use_line_collection parameter from stem plots in
the regressor module.

Breaking Change ⚠️

This change requires updating Yellowbrick's minimum Matplotlib dependency to
3.6.0 or later, as this version made LineCollection the only implementation
for stem plots.

TODO Before Merge

  • Audit all Matplotlib API usage throughout Yellowbrick for other 3.6.0+ incompatibilities
  • Update minimum Matplotlib version in setup.py and requirements.txt
  • Update documentation to reflect new minimum version requirement
  • Add migration notes to changelog

Testing Done

  • Verified CooksDistance visualizations work correctly with Matplotlib 3.6.0+
  • Tests pass locally with updated Matplotlib version

Related Issues

I'll remove the WIP tag once we've completed the Matplotlib version upgrade
across the entire package.

The use_line_collection parameter was removed in Matplotlib 3.6.0 as
LineCollection became the only implementation for stem plots. This fixes
the TypeError when using newer versions of Matplotlib.

This commit requires updating the minimum Matplotlib version to 3.6.0
before it can be merged.

Fixes #[1314]
@lwgray lwgray requested a review from bbengfort February 19, 2025 21:07
@lwgray lwgray self-assigned this Feb 19, 2025
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.

CooksDistance regressor generating error
1 participant