[Flask] Save Matplot file in svg format

Great Avenger Singh arsh840 at gmail.com
Tue Sep 8 08:33:39 CEST 2015


Hi,

I am using matplotlib to generate graph and save them as a SVG format.
A simple Python program like following does required work.

<code>

import matplotlib.pyplot as plt
import numpy as np

plt.figure(figsize=[6,6])
x = np.arange(0,100,0.00001)
y = x*np.sin(2*pi*x)
plt.plot(y)
plt.axis('off')
plt.gca().set_position([0, 0, 1, 1])
plt.savefig("test.svg")

</code>

But this is not working with Flask. I want to save file in fileSystem.

-- 

Thanks
Arshpreet Singh

I am Sikh boy, Learning by doing and Learning by teaching is my religion.
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/


More information about the Flask mailing list