-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
[Bug]: set_aspect with negative argument leads to infinite loop #23847
Comments
Please provide more info: a full minimal example (the code snippet above does not raise) and the full stack trace. Side note: Possibly someting in the backend/event loop. With Qt backend and an added
and an empty but responsive figure window. As expected the interpreter is blocked while the window is open. When closing the window, the prompt returns. Anyway, we should do input validation already on |
Steps needed:
|
Hello, May I work on this issue please sir/ma'am ? |
@ZzN1NJ4 Go for it. |
As a more general remark: Setting the aspect ratio via Should I open a feature-request issue on that? |
That seems like a bug, and a yes, please open a different issue |
Regarding my above comment: It turned out, that the issue was with some other part of the code I was working on, and matplotlib actually works fine there. Sorry for the confusion. |
Hey, I would like to tackle this issue if you don't mind. |
hi @KelsonXie, while we don't assign issues, we'd prefer that effort not get duplicated. Can you wait a few days and see if @ZzN1NJ4 puts in a PR and then help out? https://matplotlib.org/3.6.0/devel/contributing.html#issues-for-new-contributors |
Hello Sir/Madam, I would like to contribute to this issue. |
@wolbek Please open a PR! As we have said above, we do not assign issues pre-PR (opening the PR is claiming the work ;) ). |
|
Hi there! I would like to work on this issue. Can you please assign this issue to me? |
We do not assign issues. As you can see above there is already a PR open, though it is currently in draft. |
Bug summary
When calling
plt.gca().set_aspect(-1)
it leads to a infinite loop, whereValueError: 'box_aspect' and 'fig_aspect' must be positive
repeatedly, until I terminate python.Code for reproduction
Actual outcome
ValueError: 'box_aspect' and 'fig_aspect' must be positive
is thrown repeatedlyExpected outcome
either a single Value Error, or that you get the same as if you would invert the y-axis, but with a 1:1 aspect ratio.
Additional information
No response
Operating system
iOS
Matplotlib Version
3.5.3
Matplotlib Backend
MacOSX
Python version
3.10
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: