| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
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 "upstream" 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 branchIf 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. |
Sorry, something went wrong.
|
-- rebased |
Sorry, something went wrong.
| raise RuntimeError("'equal' is not allowed on shared " | ||
| "axes, try 'scaled' instead.") |
There was a problem hiding this comment.
Is the original exception important here, or should we do from None here?
Sorry, something went wrong.
There was a problem hiding this comment.
Is it a RunTimeError that we want to re-raise here, or should we change it to ValueError instead since you are saying that value isn't allowed?
Sorry, something went wrong.
There was a problem hiding this comment.
As above, I'm not sure I can even trigger this so lets try removing...
Sorry, something went wrong.
| self.set_aspect('equal', adjustable='datalim') | ||
| try: | ||
| self.set_aspect('equal', adjustable='datalim') | ||
| except RuntimeError: |
There was a problem hiding this comment.
We only want to catch the above exception, right? Technically, we should make sure not to catch other RuntimeErrors here, either by inspecting the message or by using a custom exception above.
But I'm not sure if we have to be that pedantic. Catching the wrong exception does not change control flow, it could only issue a non-instructive error message.
Sorry, something went wrong.
There was a problem hiding this comment.
OK, looking back at it now, I'm not sure what this is supposed to catch. set_aspect does not call apply_aspect, and apply_aspect is only called at draw time so far as I can tell. I couldn't figure out a test for this, so lets see if anything fails just removing it again.
Sorry, something went wrong.
There was a problem hiding this comment.
Confirmed, this doesn't fail any tests - so I'm not even sure this was reachable. Sorry I don't remember what prompted this int he first place!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Closes #11416
The error message was pretty mysterious if you called ax.axis('equal') on a shared axes...
Not clear that the functionality users are trying to get from this could not be provided, but at least clarifying the error message will help...
PR Checklist