From: <jd...@us...> - 2010-07-02 19:03:12
|
Revision: 8487 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8487&view=rev Author: jdh2358 Date: 2010-07-02 19:03:05 +0000 (Fri, 02 Jul 2010) Log Message: ----------- use class var rather than self for texmanager hack state Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/tex_demo.py trunk/matplotlib/lib/matplotlib/texmanager.py Modified: trunk/matplotlib/examples/pylab_examples/tex_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/tex_demo.py 2010-07-02 18:45:17 UTC (rev 8486) +++ trunk/matplotlib/examples/pylab_examples/tex_demo.py 2010-07-02 19:03:05 UTC (rev 8487) @@ -29,5 +29,5 @@ title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", fontsize=16, color='r') grid(True) - +#savefig('tex_demo') show() Modified: trunk/matplotlib/lib/matplotlib/texmanager.py =================================================================== --- trunk/matplotlib/lib/matplotlib/texmanager.py 2010-07-02 18:45:17 UTC (rev 8486) +++ trunk/matplotlib/lib/matplotlib/texmanager.py 2010-07-02 19:03:05 UTC (rev 8487) @@ -92,7 +92,7 @@ os.mkdir(texcache) _dvipng_hack_alpha = None - + #_dvipng_hack_alpha = dvipng_hack_alpha() # mappable cache of rgba_arrayd = {} grey_arrayd = {} @@ -455,7 +455,7 @@ report = 'No dvipng error report available.' if exit_status: raise RuntimeError('dvipng was not able to \ -process the flowing file:\n%s\nHere is the full report generated by dvipng: \ +process the following file:\n%s\nHere is the full report generated by dvipng: \ \n\n'% dvifile + report) else: mpl.verbose.report(report, 'debug') try: os.remove(outfile) @@ -516,9 +516,9 @@ if rcParams['text.dvipnghack'] is not None: hack = rcParams['text.dvipnghack'] else: - if self._dvipng_hack_alpha is None: - self._dvipng_hack_alpha = dvipng_hack_alpha() - hack = self._dvipng_hack_alpha + if TexManager._dvipng_hack_alpha is None: + TexManager._dvipng_hack_alpha = dvipng_hack_alpha() + hack = TexManager._dvipng_hack_alpha if hack: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |