matplotlib, usetex

Bill Jackson jackson at hotmail.com
Fri May 25 16:55:18 EDT 2007


Hi, I'm having some trouble plotting with the following matplotlibrc:

   text.usetex     : True

I tried clearing the cache files under ~/.matplotlib, but this did not 
help the problem. I'd post on the matplotlib mailing list, but I have a 
hard enough time browsing sourceforge's achives (frequent internal 
server errors).  Here is some output:


---- example.py ----
import pylab
pylab.plot(range(10))
pylab.show()
--------------------

# python example.py --verbose-helpful
matplotlib data path /usr/share/matplotlib/mpl-data
$HOME=/home/me
loaded rc file /home/me/matplotlibrc
matplotlib version 0.87.7
verbose.level helpful
interactive is False
platform is linux2
numerix Numeric 24.2
font search path ['/usr/share/matplotlib/mpl-data']
CONFIGDIR=/home/me/.matplotlib
loaded ttfcache file /home/me/.matplotlib/ttffont.cache
backend GTK version 2.10.4
Traceback (most recent call last):
   File "example.py", line 2, in <module>
     pylab.plot(range(10))
   File "/usr/lib/python2.5/site-packages/matplotlib/pylab.py", line 
2027, in plot
     ret =  gca().plot(*args, **kwargs)
   File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 
2131, in plot
     self.autoscale_view(scalex=scalex, scaley=scaley)
   File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 985, 
in autoscale_view
     self.set_xlim(XL)
   File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 
1227, in set_xlim
     self.viewLim.intervalx().set_bounds(xmin, xmax)
TypeError: only length-1 arrays can be converted to Python scalars.


The problem does not exist when text.usetex is False.  Ideas?




More information about the Python-list mailing list