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
in graph_plot.py, sometimes get "libpng error: Image width or height is zero in IHDR" #9529
Comments
comment:1
See also #5906. |
comment:2
|
comment:3
To reproduce this fairly quickly, type:
at a sage: prompt. I spent some time looking into this; here are the results I found before I gave up. We draw our plots with bbox_inches='tight', which means:
There's also a parameter pad_inches:
matplotlib gets its "tight bbox" with the appropriately-named get_tightbbox() function, in src/lib/matplotlib/figure.py. Its docstring proclaims,
and it's true, it does need improvement. Our graph_plot figure has "empty" axes (no title, labels, or ticklabel), but it does have an axes object with a size, which gets used for the tight bbox. I believe that size comes indirectly from get_minmax_data in sage/plot/plot.py, but I'm not sure. I can think of a few possibilities to fix the problem, ordered from best to worst.
Like I said, I'm giving up now. |
comment:4
See #9211, where similar issues are dealt with. With the new matplotlib at #9221, we can add some extra artists whose bounding boxes should be included in the tight bbox calculations (so, for example, we should be able to add the text boxes and then the tight bbox calculations would include those bounds as well). |
comment:6
I can not reproduce this, and this is six years old. I suppose this one can be closed as the code has been changed many times. Frédéric, do you agree? |
comment:7
Travis, do you agree that we can close this? |
comment:8
Just pinging this wontfix-confirmation. |
Reviewer: Travis Scrimshaw |
comment:9
I can't reproduce it either. |
comment:10
Determined to be invalid/duplicate/wontfix (closing as "wontfix" as a catch-all resolution). |
To reproduce this, you can do something like the following in bash:
CC: @fchapoton @tscrim
Component: graph theory
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/9529
The text was updated successfully, but these errors were encountered: