Skip to content

Zero-width figure crashes libpng #13857

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

Closed
amueller opened this issue Apr 3, 2019 · 3 comments
Closed

Zero-width figure crashes libpng #13857

amueller opened this issue Apr 3, 2019 · 3 comments
Milestone

Comments

@amueller
Copy link
Contributor

amueller commented Apr 3, 2019

Bug report

Bug summary

Zero-width figure crashes libpng.
This happens when using %matplotlib inline or saving to png.

Code for reproduction

import matplotlib.pyplot as plt
plt.subplots(1, 1, figsize=(3, 0))
plt.savefig("test.png")

Actual outcome

RuntimeError: libpng signaled error

Matplotlib version

  • Operating system: ubuntu / conda
  • Matplotlib version: 3.0.2, conda 3.0.2-py37h5429711_0 same at 3.0.3-py37h5429711_0
  • libpng 1.6.35-hbc83047_0, same with 1.6.36-hbc83047_

Apparently I broke "conda list" on my machine so getting all the versions seems a bit tricky.

@WeatherGod
Copy link
Member

WeatherGod commented Apr 3, 2019 via email

@WeatherGod
Copy link
Member

WeatherGod commented Apr 3, 2019 via email

@amueller
Copy link
Contributor Author

amueller commented Apr 3, 2019

yeah totally fine with an error. doing zero height works btw ?!
I guess the expected behavior that I didn't specify is "either create an empty figure or raise an informative error".

@tacaswell tacaswell added this to the v3.2.0 milestone Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants