I'm trying to create and display graph-plots dynamically by executing python scripts on a http-server using matplotlib to create the plots. Because the plots are only used at the time they are transferred to the http client (i.e. are dumped by a python script to stdout), I have to delete the plot's .png file which has been created by savefig() immediatly after the plot has been transferred.
For this application, it would be very helpful if a figure (I use agg backend) could be written to stdout instead of having to save it to the filesystem with savefig(). Is there a possibility to do so? Or did someone found an elegant way to handle such a situation?