matplotlib/matplotlib — pull request #2587 by pwuertz (2013-11-08 21:26:46+00:00)
Title: Make backend_pgf more flexible when saving to file-handles or streams (fix 1625).

Since binary data and thus raster images cannot be embedded in pgf code, saving to a stream was prohibited in backend_pgf. This PR allows saving pgf code to streams after deactivating draw_image() and emitting a user warning.

I'll merge this in a few days if there are no objections.