You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the pdf backend adding an axvspan causes an error. The full traceback is below:
File "run.py", line 27, in
experiment.savePlots('/home/mersoj/Documents/', 'multiPlots')
File "/home/mersoj/Documents/Research/forceanalysis_update/experiment.py", line 175, in savePlots
bbox_inches='tight')
File "/usr/lib/python3.3/site-packages/matplotlib/figure.py", line 1371, in savefig
self.canvas.print_figure(_args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/backend_bases.py", line 2055, in print_figure
*_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/backend_bases.py", line 1848, in print_pdf
return pdf.print_pdf(_args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 2301, in print_pdf
self.figure.draw(renderer)
File "/usr/lib/python3.3/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/figure.py", line 1007, in draw
func(_args)
File "/usr/lib/python3.3/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/axes.py", line 2088, in draw
a.draw(renderer)
File "/usr/lib/python3.3/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, _args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/patches.py", line 442, in draw
renderer.draw_path(gc, tpath, affine, rgbFace)
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 1520, in draw_path
self.file.output(self.gc.paint())
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 2032, in paint
return Op.paint_path(False, self.fillp(), self.strokep())
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 2002, in strokep
return (self._linewidth > 0 and self._alpha > 0 and
TypeError: unorderable types: str() > int()
The text was updated successfully, but these errors were encountered:
It seems that the error relates to parsing the arguments. For the other backends no errors were thrown when I used alpha as a string (I copied this from a tutorial somewhere). The pdf backend however does not accept the alpha as a string.
Alpha should be a number between 0 and 1; the tutorial where you found it given as a string is wrong. I have not been able to reproduce with master your reported behavior in which it is accepted as a string for some backends.
Ditto to what @efiring said, but like #2096 which is also about not validating inputs very well, I hope MEP13 can address these sorts of things in the long run.
When using the pdf backend adding an axvspan causes an error. The full traceback is below:
File "run.py", line 27, in
experiment.savePlots('/home/mersoj/Documents/', 'multiPlots')
File "/home/mersoj/Documents/Research/forceanalysis_update/experiment.py", line 175, in savePlots
bbox_inches='tight')
File "/usr/lib/python3.3/site-packages/matplotlib/figure.py", line 1371, in savefig
self.canvas.print_figure(_args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/backend_bases.py", line 2055, in print_figure
*_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/backend_bases.py", line 1848, in print_pdf
return pdf.print_pdf(_args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 2301, in print_pdf
self.figure.draw(renderer)
File "/usr/lib/python3.3/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/figure.py", line 1007, in draw
func(_args)
File "/usr/lib/python3.3/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, *args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/axes.py", line 2088, in draw
a.draw(renderer)
File "/usr/lib/python3.3/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
draw(artist, renderer, _args, *_kwargs)
File "/usr/lib/python3.3/site-packages/matplotlib/patches.py", line 442, in draw
renderer.draw_path(gc, tpath, affine, rgbFace)
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 1520, in draw_path
self.file.output(self.gc.paint())
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 2032, in paint
return Op.paint_path(False, self.fillp(), self.strokep())
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_pdf.py", line 2002, in strokep
return (self._linewidth > 0 and self._alpha > 0 and
TypeError: unorderable types: str() > int()
The text was updated successfully, but these errors were encountered: