-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Creating a figure of size (0, 0) raises an error #16687
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
Comments
This was brought up on gitter as something that maybe shouldn't be raising an error. |
This looks like it was an intentional change (see #13859) to avoid crashes down-stream when trying to save 0 sized images into png. We didn't put an API change note in for this because it was a bug fix and we did not think there was a valid use of a 0 size figure in the wild. Given that @djhoese gitter you said this was a test making sure your code behaved correctly in the case of nonsensical input I hope that you can just stoy worrying about that case ;) Is there a use-case for a 0 size figure? If there is not, I propose closing this as no-action (or maybe add a retro-active API change notice). Thank you for reporting this @katherinekolman |
Not that I know of but I'm definitely not the person who should have the final answer on that. I could see someone doing it for testing but at that point just make a 1x1 image if you need to. I would say this is not an issue for my team anymore. We removed the test which itself was a test of another thing that was nonsensical. Feel free to close. |
This is now actually allowed from #17610. |
Bug report
In Matplotlib 3.2.0, creating a figure of size (0, 0) raises an error.
Code for reproduction
Actual outcome
Expected outcome
The code above used to not raise an error in the previous version of matplotlib.
Matplotlib version
print(matplotlib.get_backend())
): MacOSXMatplotlib installation:
cc @djhoese
The text was updated successfully, but these errors were encountered: