[SciPy-user] problems numpy 0.9.4 and matplotlib

Alan G Isaac aisaac at american.edu
Mon Jan 23 10:38:06 CST 2006

On Mon, 23 Jan 2006, John Hunter apparently wrote: 
> You need to make sure that matplotlib knows about which array type you 
> are using by setting the "numerix" setting in you matplotlib rc file, 

I see the problem reported by Aurimas.
Details below.
Alan Isaac

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as N
>>> import pylab as P
>>> import matplotlib
>>> N.__version__
>>> matplotlib.__version__
>>> matplotlib.rcParams['numerix']
>>> P.plot(N.array([1,2,3]))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 2055, in plot
    b = ishold()
  File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 939, in ishold
    return gca().ishold()
  File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 890, in gca
    ax =  gcf().gca(**kwargs)
  File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 615, in gca
    return self.add_subplot(111, **kwargs)
  File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 465, in add_su
    a = Subplot(self, *args, **kwargs)
  File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 3974, in __init_
    Axes.__init__(self, fig, [self.figLeft, self.figBottom,
  File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 331, in __init__

  File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 360, in _init_ax
    self.xaxis = XAxis(self)
  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 501, in __init__

  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 524, in cla
    self.majorTicks.extend([self._get_tick(major=True)  for i in range(1)])
  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 834, in _get_tic
    return XTick(self.axes, 0, '', major=major)
  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 100, in __init__

    self.tick1line = self._get_tick1line(loc)
  File "C:\Python24\Lib\site-packages\matplotlib\axis.py", line 276, in _get_tic
  File "C:\Python24\Lib\site-packages\matplotlib\lines.py", line 211, in __init_
    self.set_data(xdata, ydata)
  File "C:\Python24\Lib\site-packages\matplotlib\lines.py", line 282, in set_dat
    self._segments = unmasked_index_ranges(mask)
  File "C:\Python24\Lib\site-packages\matplotlib\lines.py", line 69, in unmasked
    m = concatenate(((1,), mask, (1,)))
ValueError: arrays must have same number of dimensions

More information about the SciPy-user mailing list