Commit 0c4b120b authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update views/graphs to remove produced image

parent ccb13c85
......@@ -6,12 +6,15 @@
#--------------------------------------------------------------------------
import base64
import io
import matplotlib as mpl
import urllib.parse
from datetime import datetime
buf = io.BytesIO()
fig.savefig(buf, format="svg")
mpl.pyplot.close(fig)
data = base64.b64encode(buf.getbuffer()).decode("ascii")
data = urllib.parse.quote(data)
......
{{
import base64
import io
import matplotlib as mpl
buf = io.BytesIO()
fig.savefig(buf, format="pdf")
mpl.pyplot.close(fig)
data = base64.b64encode(buf.getbuffer()).decode("ascii")
response.body = io.StringIO()
......
{{
import base64
import io
import matplotlib as mpl
buf = io.BytesIO()
fig.savefig(buf, format="png", dpi=300)
mpl.pyplot.close(fig)
data = base64.b64encode(buf.getbuffer()).decode("ascii")
response.body = io.StringIO()
......
Markdown is supported
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