<div dir="ltr">Next time provide your flask code that is not working. Here's an example of returning a matplotlib graph as SVG format: <a href="https://gist.github.com/wilsaj/862153">https://gist.github.com/wilsaj/862153</a>. Since you want to save it to the fileSystem, you will need to implement two routes, see <a href="http://stackoverflow.com/questions/20107414/passing-a-matplotlib-figure-to-html-flask">http://stackoverflow.com/questions/20107414/passing-a-matplotlib-figure-to-html-flask</a>.<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 2:33 AM, Great Avenger Singh <span dir="ltr"><<a href="mailto:arsh840@gmail.com" target="_blank">arsh840@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am using matplotlib to generate graph and save them as a SVG format.<br>
A simple Python program like following does required work.<br>
<br>
<code><br>
<br>
import matplotlib.pyplot as plt<br>
import numpy as np<br>
<br>
plt.figure(figsize=[6,6])<br>
x = np.arange(0,100,0.00001)<br>
y = x*np.sin(2*pi*x)<br>
plt.plot(y)<br>
plt.axis('off')<br>
plt.gca().set_position([0, 0, 1, 1])<br>
plt.savefig("test.svg")<br>
<br>
</code><br>
<br>
But this is not working with Flask. I want to save file in fileSystem.<br>
<br>
--<br>
<br>
Thanks<br>
Arshpreet Singh<br>
<br>
I am Sikh boy, Learning by doing and Learning by teaching is my religion.<br>
------------------------------------------------------------------------------<br>
Slashdot TV.<br>
Video for Nerds.  Stuff that matters.<br>
<a href="http://tv.slashdot.org/" rel="noreferrer" target="_blank">http://tv.slashdot.org/</a><br>
_______________________________________________<br>
Flask mailing list<br>
<a href="mailto:Flask@python.org">Flask@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/flask" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/flask</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Scott Werner<br><a href="mailto:scott.werner.vt@gmail.com" target="_blank">scott.werner.vt@gmail.com</a><br></div>
</div></div>