Return images with matplotlib?

Jan Danielsson jan.m.danielsson at gmail.com
Sun Feb 4 20:18:56 EST 2007


Hello all,

   I have written a program which takes some data from a postgresql
database, and via mod_python outputs it as tables on a web site. Now I
would like to present these tables as graphs, which matplotlib can do.
  But in order to properly display these graphs on the web page, I need
to return the image data, like so:

def barchart(req, params):
   some_format = matplotlib.generate_fancy_graph(params)
   png_buf = make_png_buffer(some_format)
   return png_buf

   Is this possible? If so -- how?

-- 
Kind regards,
Jan Danielsson
------------ And now a word from our sponsor ------------------
For a quality usenet news server, try DNEWS, easy to install,
fast, efficient and reliable. For home servers or carrier class
installations with millions of users it will allow you to grow!
----  See http://netwinsite.com/sponsor/sponsor_dnews.htm  ----



More information about the Python-list mailing list