-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add more tests for mplot3d #23453
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
Add more tests for mplot3d #23453
Conversation
431cdd6
to
680dc79
Compare
Is there a test that verifies turning the panes on and off works? |
No, there isn't as far as I can tell. And it doesn't really seem like it does work (as far as I can tell). I will revert those changes and just keep the coverage increase. Will see if I can get that working (or at least test it) in another PR. |
x = np.arange(10) | ||
ax.plot(x, np.sin(x)) | ||
fig.canvas.draw() | ||
assert ax.get_axis_position() == (False, True, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you understand what this does, it could do with a docstring. It appears unused though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot really say that I do, no...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should be deprecated? This was deprecated as a renderer property in 3.4 and removed now: https://github.com/matplotlib/matplotlib/blob/main/doc/api/next_api_changes/removals/00001-DS.rst
The docs failure is the sphinx-gallery issue with resetting the units registry, merging over the failure. |
PR Summary`
Added tests for a bunch of mplot3d code.
Removedget_frame_on
andset_frame_on
as they can be inherited (only difference is the . As I did not really see the effect of them, I also removed the use in thedraw
method. I tried to check back, but couldn't really figure out why it was forced to another value there. Seems a bit doubtful.In themargins
method, the logic for raising was changed. Currently, passing e.g.margins(1, x=2)
was allowed, setting all the margins to 1 without any type of information. Now it raises instead. Not sure if that is the idea, but it seems to make more sense considering the error message and expected usage. Actually, the same thing happens in the standardmargins
method as well...matplotlib/lib/matplotlib/axes/_base.py
Lines 2721 to 2723 in 51ce677
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).