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
savefig crashes in backend_p[df|s].py when using plot-option mew #3332
Comments
That is a very old version of Matplotlib. Could you please try with a newer version. Preferably the latest release candidate of 1.4.0 |
Well, yes, it is indeed. However, it's the most current there is for Debian Wheezy (packaged). As I don't have sudo or root permissions on my machine and have no idea how to install it locally and then import it, I would need a little nudge in the right direction. |
Note that the Error message and traceback for eps export differ slightly from the pdf-ones posted above:
[TAC edited to add mark up] |
I think that the issue is that |
The doc string says
So you can replace integer with float in the above. |
Thanks Jens! That was it. |
Agreed there is scope for improving the validation of input parameters to plot et. al. |
I suspect that someplace in the agg layer there is a (maybe implicit) cast to float involved in going down to c++, whereas in this case the value is being thrown (un-validated) at a string formatter or being used in multiplication. |
Debian Wheezy
Python 2.7.3
matplotlib 1.1.1rc2
I have a simple plot with a marker which I want to save to PDF/EPS with savefig. When setting the markeredgewidth I get an Error from savefig or rather backend_pdf.py. The same holds for eps export. Here's the traceback (MWE for this behaviour below):
Traceback (most recent call last):
File "mwe.py", line 13, in
fig.savefig('mmo_example_1.pdf',format='pdf')
File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 1185, in savefig
self.canvas.print_figure(_args, *_kwargs)
File "/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", line 2021, in print_figure
*_kwargs)
File "/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", line 1789, in print_pdf
return pdf.print_pdf(_args, **kwargs)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_pdf.py", line 2191, in print_pdf
file.close()
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_pdf.py", line 482, in close
self.writeMarkers()
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_pdf.py", line 1212, in writeMarkers
bbox = bbox.padded(lw * 0.5)
TypeError: can't multiply sequence by non-int of type 'float'
The text was updated successfully, but these errors were encountered: