Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix zlabel on 3D axes being cut off#28576
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
From a subjective view, the test image looks worse. However, I think objectively, it is more correct in that it is doing tight layout, and the z label really is far away. @scottshambaugh is there some way we can get the labels to not be so far away from the Axes once it is closer to head on? |
@QuLogic does this need a rebase for the circleci tests to pass or is it something else? |
Yes, needs a rebase. |
Can you please add a test that generates the image that you show above? |
Right now the label offsets are hardcoded without an rcparam. The labels are drawn here: matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py Lines 561 to 575 ine6f2b0c
With matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py Lines 587 to 594 ine6f2b0c
In general |
Opened an issue for controlling the label positions#28606, but I think it's a bit separate from the issue at discussion here. |
@QuLogic I don't think the test failing is related to my changes. I re based and force pushed. Let me know if there is anything else to do for this PR :) |
scottshambaugh commentedAug 9, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I personally don't think this change should be made until there is a way to avoid the super-compressed subplots as seen in the test image, and I don't think that controlling the axis label position like my comment above is a robust way to do so. Not sure what that solution looks like, but would want to see that update made in order for this fix to go in. |
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.
Request that a fix for this image change be made prior to merging in the original fix.
PR summary
Close issue#28117
This PR tries to imitated the behaviour for adding labels with 2D plots in 3D plots. I also updated the png for the corresponding test.
This is a screenshot of the fixed issue:
PR checklist