-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Provide adjustable='box'
to 3D axes aspect ratio setting
#23552
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
Conversation
adjustable='box'
to 3D axes aspect ratio setting
I think that it may be possible to factor out
and then do something like:
(I take it that numpy may have a better way to do the index fiddling.) |
Ahh, I didn't see the indentation level correctly. And it seems like you can get away with simpler indexing, something like:
|
Looks promising! I think a test, update of documentation (right now it says that it is ignored), a release note, and an argument check (similar to the aspect test, using For test, I guess that reusing the same aspect test, but with |
I've got this factored out here at the moment, we can settle on whatever. |
Turns out that the variable was already available at that point in the code. Bad read-up on my side. |
This is brilliant; I'll rebase once it gets merged. |
I expect that MR to take a while to get reviewed and go through so don't let it hold you back on this one! :) I can handle the merge conflict over there. |
aa5228b
to
2a702cf
Compare
This is great! Looks good to me now. |
Doc build has failed. I think this is the error (since the log says that 'build finished with problems, 1 warning'):
which isn't quite clear to me. I don't suppose modifying |
The docs font fallback issue is unrelated to your PR, try rebasing onto main and seeing if it works when it runs again. |
d9518e0
to
75e605f
Compare
It looks like this didn't get reviewed in time to make the cut for 3.6, which won't have an effect except that the what's new might need to be rewritten. |
How does it work—will it be enough to just create a new "What's New" file? |
Actually, no changes are required for the what's new. The content and structure is version agnostic. When the PR gets merged the content is put int the @oscargus you have started looking into this. Could you give a second review? |
Considering that this PR modifies a what's new note from 3.6, I believe that something should be done. I think the PR is good to go, subject to the what's new note, so will not merge at this stage. |
Could you also take a look at #23552 (comment). |
76ab0f0
to
57f2b5a
Compare
For the "What's New" entry, I used scottshambaugh's original example, but with slightly different dimensions of the box (as in the test), which I think highlight the differences nicely. |
Looks good! Thanks! |
…b#23552) * Provided `adjustable='box'` option to set 3D aspect ratio. * "What's New": `adjustable` argument of 3D plots aspect ratio.
PR Summary
#23409 implemented equal aspect for 3D axes similar to the way
axes2d.set_aspect('equal', adjustable='datalim')
works. This adds functionality similar to the wayaxes2d.set_aspect('equal', adjustable='box')
works (i.e. without changing the limits on the axes of coordinates).The code is probably not the cleanest; style suggestions are appreciated.
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).