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

Address deprecation warning for 'Axes.cla' #45

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

Conversation

hemmelig
Copy link

Address a deprecation warning for the Axes.cla method, which was added in matplotlib version 3.6. This is a very minor change, where instances of .cla have been changed to .clear.

Information on change:
https://matplotlib.org/devdocs/api/next_api_changes/deprecations/23735-ES.html

Address the deprecation warning for the `Axes.cla` method, which was
added in matplotlib version 3.6. This is a very minor change, where
instances of `.cla` have been changed to `.clear`.

Very minor, but could break something down the line.

Information on change:
https://matplotlib.org/devdocs/api/next_api_changes/deprecations/23735-ES.html
@hemmelig
Copy link
Author

I suppose it would also be useful to soft deprecate the .cla method locally to maintain backwards compatibility for existing users of mplstereonet? Maybe just a wrapper:

    def cla(self):
        warnings.warn(
            "The `.cla` method has been deprecated in favour of `.clear` in "
            "matplotlib 3.6 and onwards."
        )
        self.clear()

with the appropriate import at the top.

@AlexanderJuestel
Copy link
Contributor

Hey,

I am also seeing this issue in the GemPy tests now.

Cheers
Alex

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