I have the following code:
fig = plt.figure(1, figsize=(6,6))
ax = fig.add_axes([0.1,0.1,0.8,0.8])
labels = 'Female', 'Male'
fracs = [50,50]
ax.pie(fracs, labels=labels, autopct='%1.1f%%', shadow=True)
image_folder=os.path.join(request.folder, 'static/tmp/')
fig.savefig('%stest.png' % image_folder)
return dict(mp_list=mp_list, image_folder= '/init/static/tmp/test.png')
The problem is that the image keeps on being overeritten when i change the
fracs. How do i create a new image each time i refresh the page?
--
.......................................................................................
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA
Cell: +260 97 7760473
website: http://www.opensource.org.zm
~/
Human Knowledge belongs to the world! - AntiTrust
Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881
/~
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.