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

Sign up
Appearance settings

Remove nonfunctional Axes3D.set_frame_on and get_frame_on methods. #25648

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
timhoffm merged 4 commits into matplotlib:main from saranti:remove_3dframe_on
Apr 25, 2023

Conversation

Copy link
Contributor

@saranti saranti commented Apr 8, 2023

PR Summary

Fixes #24689. Remove Axes3D.set_frame_on and get_frame_on from the codebase and from the link in the documentation.

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

I think we need to keep these functions and raise NotImplementedError, because by removing we would inherit the functionality from Axes, which does not work for 3D.

Copy link
Contributor Author

saranti commented Apr 9, 2023

I think we need to keep these functions and raise NotImplementedError, because by removing we would inherit the functionality from Axes, which does not work for 3D.

Ok. The python docs state that NotImplementedError should not be used to indicate that an operator or method is not meant to be supported at all, but rather if the method is still being developed etc. Do you still want to go ahead with it? Do you have any more plans for this, like getting rid of the frame_on concept entirely?

Copy link
Member

rcomer commented Apr 9, 2023
edited
Loading

From the note in the docs, it looks like the recommended approach is to set the method to None.
https://docs.python.org/3/library/exceptions.html#NotImplementedError

timhoffm reacted with thumbs up emoji

Copy link
Member

timhoffm commented Apr 9, 2023

Setting to none (plus leaving a comment there) seems the right approach. Thanks for checking the meaning of NotImplementedError.

Copy link
Member

rcomer commented Apr 10, 2023

My understanding of the guidance is to set the actual method to None, rather than the return value. I couldn’t find any examples by googling, but here is one I happen to know about in another project, where we wanted to disable the __iter__ method.

https://github.com/SciTools/iris/blob/c74d78331aeb394383d1552e3d1679b0f734b402/lib/iris/cube.py#L2551-L2553

saranti reacted with thumbs up emoji

Copy link
Member

Sorry for not seeing this until now. Good that things were clarified in the meanwhile. I think a note in doc/api/next_api_changes/removals/ would be nice. Basically saying that they were not working and therefore removed. If nothing else we can point at it, in case someone reports an error later. Other than that, is should be good to go!

saranti reacted with thumbs up emoji

Copy link
Member

@oscargus oscargus left a comment

Choose a reason for hiding this comment

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

@timhoffm can you please have a new look?

@timhoffm timhoffm added this to the v3.8.0 milestone Apr 25, 2023
@timhoffm timhoffm merged commit 110c774 into matplotlib:main Apr 25, 2023
@saranti saranti deleted the remove_3dframe_on branch June 23, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@timhoffm timhoffm timhoffm approved these changes

@oscargus oscargus oscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

[Bug]: Axes3D.set_frame_on not working as documented

AltStyle によって変換されたページ (->オリジナル) /