mdboom/matplotlib — pull request #7 by leejjoon (2011-11-07 14:42:54+00:00)
Title: Py3 update texmanager

I have encountered an exception raised when usetex=True.

```
File "/home/jjlee/.virtualenvs/dev32/lib/python3.2/site-packages/matplotlib/texmanager.py", line 325, in make_tex_preview
fh.write(s)
TypeError: 'str' does not support the buffer interface
```

This happens when tex string is not cached in ~/.matplotlib/tex.cache.
Replacing fh.write(s) to fh.write(s.encode("ascii") seem to fix the problem but I'm not quite sure if this is an appropriate approach.