matplotlib/matplotlib — pull request #1862 by mdboom (2013-03-27 16:41:23+00:00)
Title: Matplotlib savefig() closes BytesIO object when saving in postscript format

In Python 3, I am seeing the following bug:

```
In [1]: from io import BytesIO

In [2]: import matplotlib.pyplot as plt

In [3]: b = BytesIO()

In [4]: fig = plt.figure()

In [5]: ax = fig.add_subplot(1,1,1)

In [6]: ax.plot([1,2,3])
Out[6]: []

In [7]: fig.savefig(b, format='eps')

In [8]: b.seek(0)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in ()
----> 1 b.seek(0)

ValueError: I/O operation on closed file.
```

As far as I can tell, this does not occur with ``StringIO`` in Python 2.x.

@mdboom - is this related to #1779?