Hello everyone. If I try to use LaTeX for text processing (i.e. text.usetex : True in my matplotlibrc), I get a cryptic LaTeX error which didn't use to be there before. I get the same problem when using matplotlib-0.98.5 which I compiled from source, and matplotlib-1.0.0 from macports. My python version is 2.6.5 (from macports) and I am running Mac OS X 10.6.4.
The error messages are pretty much the same no matter what I plot, and everything works fine if text.usetex : False. Regards Paul.
# This script demonstrates that font effects specified in your pdftex.map # are now supported in pdf usetex. import matplotlib matplotlib.rc('text', usetex=True) import pylab def setfont(font): return r'\font\a %s at 14pt\a ' % font for y, font, text in zip(range(5), ['ptmr8r', 'ptmri8r', 'ptmro8r', 'ptmr8rn', 'ptmrr8re'], ['Nimbus Roman No9 L ' + x for x in ['', 'Italics (real italics for comparison)', '(slanted)', '(condensed)', '(extended)']]): pylab.text(0, y, setfont(font) + text) pylab.ylim(-1, 5) pylab.xlim(-0.2, 0.6) pylab.setp(pylab.gca(), frame_on=False, xticks=(), yticks=()) pylab.title('Usetex font effects') pylab.savefig('usetex_fonteffects.pdf')
~/Desktop $ python usetex_fonteffects.py Traceback (most recent call last): File "usetex_fonteffects.py", line 22, in <module> pylab.savefig('usetex_fonteffects.pdf') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py", line 363, in savefig return fig.savefig(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 1084, in savefig self.canvas.print_figure(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backend_bases.py", line 1886, in print_figure **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backend_bases.py", line 1696, in print_pdf return pdf.print_pdf(*args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py", line 2156, in print_pdf self.figure.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 798, in draw func(*args) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py", line 1934, in draw a.draw(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/text.py", line 524, in draw bbox, info = self._get_layout(renderer) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/text.py", line 298, in _get_layout ismath=False) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_pdf.py", line 1766, in get_text_width_height_descent renderer=self) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/texmanager.py", line 606, in get_text_width_height_descent dvifile = self.make_dvi(tex, fontsize) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/texmanager.py", line 371, in make_dvi string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex)) + report) RuntimeError: LaTeX was not able to process the following string: 'lp' Here is the full report generated by LaTeX: This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live/MacPorts 2009_6) entering extended mode ! I can't find file `50c9e93d8d242d27078b4854fe3aa6e5.tex'. <*> 50c9e93d8d242d27078b4854fe3aa6e5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name ! Emergency stop. <*> 50c9e93d8d242d27078b4854fe3aa6e5.tex No pages of output. Transcript written on texput.log.
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users