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

Skip to content

Remove nonfunctional Axes3D.set_frame_on and get_frame_on methods.#25648

Merged
timhoffm merged 4 commits intomatplotlib:mainfrom
saranti:remove_3dframe_on
Apr 25, 2023
Merged

Remove nonfunctional Axes3D.set_frame_on and get_frame_on methods.#25648
timhoffm merged 4 commits intomatplotlib:mainfrom
saranti:remove_3dframe_on

Conversation

@saranti
Copy link
Copy Markdown
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
Copy Markdown
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.

@saranti
Copy link
Copy Markdown
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?

@rcomer
Copy link
Copy Markdown
Member

rcomer commented Apr 9, 2023

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
Copy link
Copy Markdown
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.

@rcomer
Copy link
Copy Markdown
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

@oscargus
Copy link
Copy Markdown
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!

Copy link
Copy Markdown
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
eslothower pushed a commit to eslothower/matplotlib that referenced this pull request May 3, 2023
@saranti saranti deleted the remove_3dframe_on branch June 23, 2023 10:54
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
imgbot Bot pushed a commit to kkipngenokoech/matplotlib that referenced this pull request Apr 19, 2026
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.

[Bug]: Axes3D.set_frame_on not working as documented

5 participants