Re: [Matplotlib-users] Render image to string

2009-07-11 Thread John Hunter
On Tue, Jul 7, 2009 at 6:41 PM, Doug Penner wrote: > so instead of doing > >    plt.savefig("some/location.png") > >    return HttpResponse(" />") > > I could do > >    return HttpResponse(plt.image_render('image/png'), mimetype="image/png") > > and not have to worry about deleting the image later

[Matplotlib-users] Render image to string

2009-07-11 Thread Doug Penner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am using matplotlib in a django application and would like to render a graph and return it directly. Currently I have plt.savefig("some/location.png") working. But since the images I will be generating are only EVER needed once, I would like t