Commit 9d5b0b52 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[prefix][plotters][user][scatter] Fix IO type used to save plot

matplotlib accepts a StringIO for Python 2 but a wants a BytesIO
with Python 3
parent 55625f9a
......@@ -102,7 +102,10 @@ class Plotter:
if any(self.legend): ax.legend()
# Returns the image
sio = six.StringIO()
if six.PY2:
sio = six.StringIO()
else:
sio = six.BytesIO()
if self.mimetype == 'image/png':
pyplot.savefig(sio, format='png')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment