Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Matplotlib deprecation of loc as a positional keyword in legend functions #8429

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

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

EwoutH
Copy link
Contributor

@EwoutH EwoutH commented Oct 9, 2022

With the 3.6 release Matplotlib deprecated using loc as a positional keyword for the figure.legend function, making it a keyword only function starting from Matplotlib 3.8.

This commit adds the loc keyword to the figure.legend and figlegend functions to resolve the depreciation warning and prepare for future Matplotlib versions.

The loc keyword is added in 23 places over 6 files, including functions, docs and tests. I think I caught all occurrences, but double checking would be appreciated. It removes all 21 MatplotlibDeprecationWarnings caught by the Azure CI (before, after).

  • tests added / passed.
  • code/documentation is well formatted.
  • properly formatted commit message. See
    NumPy's guide.

With the 3.6 release Matplotlib depreciated using `loc` as a positional keyword for the figure.legend function, making it a keyword only function starting from Matplotlib 3.8.

This commit adds the `loc` keyword to the figure.legend and figlegend functions to resolve the depreciation warning and prepare for future Matplotlib versions.
@bashtage
Copy link
Member

Unrelated failure. Thanks for the future proofing.

@bashtage bashtage merged commit cd9ad7f into statsmodels:main Oct 10, 2022
@EwoutH
Copy link
Contributor Author

EwoutH commented Oct 10, 2022

Thanks for merging!

@josef-pkt josef-pkt added this to the 0.14 milestone Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants