-----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 to simply return the image directly through django
without needing to save it, then return an URI.


so instead of doing

    plt.savefig("some/location.png")

    return HttpResponse("<html><body><img src='some/location.png'
/></body></html>")

I could do

    return HttpResponse(plt.image_render('image/png'), mimetype="image/png")

and not have to worry about deleting the image later (there are LOT that
get generated)


Any help would be greatly appreciated.
~Doug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpT3SAACgkQznigyIaDZ0VyPACgg0CoapaPTdLT1vGKKMK9En8O
gasAn1LV9F1ElT6vOOq/PCRzp7kkW+5s
=6oe8
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to