Hi all, with a current SVN checkout, I'm having serious latex problems (run with debug-annoying):
In [5]: plot([1,2,3]) FigureCanvasAgg.draw RendererAgg._get_agg_font findfont failed New Century Schoolbook findfont failed Century Schoolbook L findfont failed Utopia findfont failed ITC Bookman findfont failed Bookman findfont found Bitstream Vera Serif, normal, normal 500, normal, 12.0 findfont returning /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/mpl-data/VeraSe.ttf Found dvipng version 1.8 latex -interaction=nonstopmode -output-directory="/home/fperez/.matplotlib/tex.cache" "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.tex" > "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.output" latex: unrecognized option `-output-directory=/home/fperez/.matplotlib/tex.cache' Try `latex --help' for more information. --------------------------------------------------------------------------- exceptions.RuntimeError Traceback (most recent call last) /home/fperez/research/papers/nsform/scripts/<ipython console> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/pylab.py in plot(*args=([1, 2, 3],), **kwargs={}) 2021 except: 2022 hold(b) -> 2023 raise 2024 2025 hold(b) [... snip ...] /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/text.py in _get_layout(self=<matplotlib.text.TextWithDash instance>, renderer=<matplotlib.backends.backend_agg.RendererAgg instance>) 184 heightt += 3 # 3 pixel pad 185 for line in lines: --> 186 w,h = renderer.get_text_width_height( w = undefined h = undefined renderer.get_text_width_height = <bound method RendererAgg.get_text_width_height of <matplotlib.backends.backend_agg.RendererAgg instance at 0x4183ac4c>> line = '$0$' self._fontproperties = <matplotlib.font_manager.FontProperties instance at 0x418402cc> global ismath = undefined self.is_math_text = <bound method TextWithDash.is_math_text of <matplotlib.text.TextWithDash instance at 0x4184030c>> 187 line, self._fontproperties, ismath=self.is_math_text()) 188 /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py in get_text_width_height(self=<matplotlib.backends.backend_agg.RendererAgg instance>, s='$0$', prop=<matplotlib.font_manager.FontProperties instance>, ismath='TeX', rgb=(0, 0, 0)) 237 size = prop.get_size_in_points() 238 texmanager = self.get_texmanager() --> 239 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb) Z = undefined texmanager.get_rgba = <bound method TexManager.get_rgba of <matplotlib.texmanager.TexManager instance at 0x41bebd2c>> s = '$0$' size = 12.0 self.dpi.get = <built-in method get of tuple object at 0x41736dcc> rgb = (0, 0, 0) 240 m,n,tmp = Z.shape 241 return n,m /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py in get_rgba(self=<matplotlib.texmanager.TexManager instance>, tex='$0$', fontsize=12.0, dpi=100.0, rgb=(0, 0, 0)) 333 if Z is None: 334 # force=True to skip cacheing while debugging --> 335 pngfile = self.make_png(tex, fontsize, dpi, force=False) pngfile = undefined self.make_png = <bound method TexManager.make_png of <matplotlib.texmanager.TexManager instance at 0x41bebd2c>> tex = '$0$' fontsize = 12.0 dpi = 100.0 global force = undefined global False = undefined 336 X = readpng(os.path.join(self.texcache, pngfile)) 337 /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py in make_png(self=<matplotlib.texmanager.TexManager instance>, tex='$0$', fontsize=12.0, dpi=100.0, force=False) 235 # see get_rgba for a discussion of the background 236 if force or not os.path.exists(pngfile): --> 237 dvifile = self.make_dvi(tex, fontsize) dvifile = undefined self.make_dvi = <bound method TexManager.make_dvi of <matplotlib.texmanager.TexManager instance at 0x41bebd2c>> tex = '$0$' fontsize = 12.0 238 outfile = basefile+'.output' 239 command = 'dvipng -bg Transparent -D %s -T tight -o "%s" "%s" \ /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py in make_dvi(self=<matplotlib.texmanager.TexManager instance>, tex='$0$', fontsize=12.0, force=0) 207 fh = file(outfile) 208 if exit_status: --> 209 raise RuntimeError('LaTeX was not able to process the flowing \ global RuntimeError = undefined tex = '$0$' fh.read = <built-in method read of file object at 0x418375a0> 210 string:\n%s\nHere is the full report generated by LaTeX: \n\n'% tex + fh.read()) 211 else: verbose.report(fh.read(), 'debug') RuntimeError: LaTeX was not able to process the flowing string: $0$ Here is the full report generated by LaTeX: In [6]: My matplotlibrc file has (this is what I think is relevant): backend : TkAgg # the default backend numerix : numpy # numpy, Numeric or numarray text.usetex : True # use latex for all text handling. For more information, see # http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex text.dvipnghack : False # some versions of dvipng don't handle This is running on a Fedora Core 3 box. Yes, I'll be upgrading to Ubuntu very soon, but in the meantime it would be nice to be able to use mpl :) My latex info: planck[scripts]> latex --version TeX (Web2C 7.4.5) 3.14159 kpathsea version 3.4.5 Copyright (C) 1997-2003 D.E. Knuth. Cheers, f Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users