Hi matplotlib users,
I'm using matplotlib for an application for producing tsunami travel time
contour maps. Recently I discovered the CherryPy (cherrypy.org) web server
framework which allows you to very easily embed a web server in your
application. This allows the application to be accessed remotely through a
At present the application produces the contour plots when it receives input
from a web browser that it should do so. The contour plot png image is then
saved to disk and served to the user.
CherryPy is able to serve/stream the image directly to the browser if it is
converted to a string using an appropriate encoding (png, rgb maybe). PIL is
able to do this conversion:
I would like to do something similar with my matplotlib image (i.e. convert it
to a string with an appropriate encoding) instead of writing it to the
harddisk. Does anyone know if that is possible?