matplotlib/matplotlib — pull request #2665 by piannucci (2013-12-10 04:05:53+00:00)
Title: MacOSX backend supports 2x DPI images and MathTeX.

This is a bit of a hack. Test with

import numpy as np, pylab as pl
pl.imshow(np.arange(1000000).reshape(1000,1000) % 997)
pl.text(0,100,'$foo$')

The behavior on figimage is possibly not correct?