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
#!/usr/bin/python2
from io import StringIO
from matplotlib.backends.backend_svg import FigureCanvasSVG
from matplotlib.figure import Figure
output = StringIO()
fig = Figure()
canvas = FigureCanvasSVG(fig)
canvas.print_svg(output)
Traceback (most recent call last):
File "./print_svg.py", line 11, in <module>
canvas.print_svg(output)
File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_svg.py", line 1101, in print_svg
return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
UnboundLocalError: local variable 'svgwriter' referenced before assignment
using BytesIO() instead works fine.
The text was updated successfully, but these errors were encountered:
matplotlib-1.2.0rc2
using BytesIO() instead works fine.
The text was updated successfully, but these errors were encountered: