-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add ability to scale BBox with just x or y values #21326
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
I don't really like either APIs, but I agree this one makes more sense (saving an unnecessary meshgrid). |
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.
This is not particularly elegant, but I do think we want the ability to autoscale from separate X, Y vectors. And we don't want to have to meshgrid X, Y only for the purpose of autoscaling.
So it seems to be the right solution.
Comments address and a test added (that fails before this PR). I've tagged as 3.5.1 as this is a bugfix. |
This PR is affected by a re-writing of our history to remove a large number of accidentally committed files see discourse for details. To recover this PR it will need be rebased onto the new default branch (main). There are several ways to accomplish this, but we recommend (assuming that you call the matplotlib/matplotlib remote git remote update
git checkout main
git merge --ff-only upstream/main
git checkout YOUR_BRANCH
git rebase --onto=main upstream/old_master
# git rebase -i main # if you prefer
git push --force-with-lease # assuming you are tracking your branch If you do not feel comfortable doing this or need any help please reach out to any of the Matplotlib developers. We can either help you with the process or do it for you. Thank you for your contributions to Matplotlib and sorry for the inconvenience. |
…326-on-v3.5.x Backport PR #21326 on branch v3.5.x (Add ability to scale BBox with just x or y values)
PR Summary
This is useful in
Axes3D
, when we are autoscaling with x and y values that are not always the same shape. As an example, see the contour code in #21310. Fixes #21310, and an alternative (with a nicer fix in my opinion) to #21312If someone leaves a positive comment on this, I'll add a what's new entry and tests.
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).