all 3d examples broken on branch

This appears to have escaped my tests :frowning:

All of the 3d examples are failing on the 1.0.1 branch – can anyone replicate this?

johnh@…552…912…:mplot3d> python subplot3d_demo.py
Traceback (most recent call last):

File “subplot3d_demo.py”, line 14, in ?
ax = fig.add_subplot(1, 2, 1, projection=‘3d’)
File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py”, line 687, in add_subplot

a = subplot_class_factory(projection_class)(self, *args, **kwargs)

File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py”, line 8380, in init
self._axes_class.init(self, fig, self.figbox, **kwargs)

File “/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/mplot3d/axes3d.py”, line 76, in init
frameon=True,
File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py”, line 448, in init

self._init_axis()

File “/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/mplot3d/axes3d.py”, line 110, in _init_axis
self.xy_dataLim.intervalx, self)
File “/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/mplot3d/axis3d.py”, line 89, in init

self.axes._set_artist_props(self.line)

File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py”, line 780, in _set_artist_props
a.set_axes(self)
File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/lines.py”, line 397, in set_axes

if ax.xaxis is not None:

AttributeError: ‘Axes3DSubplot’ object has no attribute ‘xaxis’

I tried the naive fix in lines.py

def set_axes(self, ax):
    Artist.set_axes(self, ax)

    if getattr(ax, 'xaxis', None):
        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)

set_axes.__doc__ = Artist.set_axes.__doc__

but this just pushed the bug downstream

johnh@…912…:mplot3d> python subplot3d_demo.py
Traceback (most recent call last):
File “subplot3d_demo.py”, line 14, in ?

ax = fig.add_subplot(1, 2, 1, projection='3d')

File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py”, line 687, in add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)

File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py”, line 8380, in init
self._axes_class.init(self, fig, self.figbox, **kwargs)
File “/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/mplot3d/axes3d.py”, line 76, in init

frameon=True,

File “/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py”, line 448, in init
self._init_axis()
File “/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/mplot3d/axes3d.py”, line 120, in _init_axis

ax.init3d()

AttributeError: ‘XAxis’ object has no attribute ‘init3d’

Perhaps someone with more understanding of 3D internals can correct this?

Oops, type in my naieve fix. Should read

def set_axes(self, ax):
    Artist.set_axes(self, ax)
    if getattr(ax, 'xaxis', None) is not None:

        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)

set_axes.__doc__ = Artist.set_axes.__doc__

but the problem remains.

···

On Wed, Jan 5, 2011 at 10:38 AM, John Hunter <jdh2358@…552…149…> wrote:

I tried the naive fix in lines.py

def set_axes(self, ax):
    Artist.set_axes(self, ax)

    if getattr(ax, 'xaxis', None):
        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)



set_axes.__doc__ = Artist.set_axes.__doc__

Hmmm, let me check it out… I hope it wasn’t one of my patches that did it…

Ben Root

···

On Wed, Jan 5, 2011 at 10:41 AM, John Hunter <jdh2358@…149…> wrote:

On Wed, Jan 5, 2011 at 10:38 AM, John Hunter <jdh2358@…149…> wrote:

I tried the naive fix in lines.py

def set_axes(self, ax):
    Artist.set_axes(self, ax)

    if getattr(ax, 'xaxis', None):
        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)





set_axes.__doc__ = Artist.set_axes.__doc__

Oops, type in my naieve fix. Should read

def set_axes(self, ax):
    Artist.set_axes(self, ax)

if getattr(ax, ‘xaxis’, None) is not None:

        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)




set_axes.__doc__ = Artist.set_axes.__doc__

but the problem remains.

I initially had problems (although with the gtkagg backend…), but then I moved my development branch build to another directory to effectively hide it and then rebuilt the 1.0.1 branch, and everything worked fine. Maybe there was something in the build process that got messed up?

Ben Root

···

On Wed, Jan 5, 2011 at 10:44 AM, Benjamin Root <ben.root@…854…> wrote:

On Wed, Jan 5, 2011 at 10:41 AM, John Hunter <jdh2358@…149…> wrote:

On Wed, Jan 5, 2011 at 10:38 AM, John Hunter <jdh2358@…149…> wrote:

I tried the naive fix in lines.py

def set_axes(self, ax):
    Artist.set_axes(self, ax)

    if getattr(ax, 'xaxis', None):
        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)






set_axes.__doc__ = Artist.set_axes.__doc__

Oops, type in my naieve fix. Should read

def set_axes(self, ax):
    Artist.set_axes(self, ax)

if getattr(ax, ‘xaxis’, None) is not None:

        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)





set_axes.__doc__ = Artist.set_axes.__doc__

but the problem remains.

Hmmm, let me check it out… I hope it wasn’t one of my patches that did it…

Ben Root

Very strange – this is what I am doing for a clean build and install. Can’t see where I am going wrong…
I’m also having the same problem on two platofrms (python2.4 solaris, python2.6 linux)

jdhunter@…687…:mpl1> rm -rf build ~/dev/lib/python2.6/site-packages/matplotlib* ~/.matplotlib/cache

jdhunter@…687…:mpl1> svn up
At revision 8890.

jdhunter@…687…:mpl1> svn diff

jdhunter@…687…:mpl1> python setup.py install --prefix=~/dev >& build.out

jdhunter@…687…:mpl1> python -c ‘import matplotlib; print matplotlib.version, matplotlib.file
1.0.1rc1 /home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/init.pyc
jdhunter@…687…:mpl1> python examples/mplot3d/subplot3d_demo.py --verbose-helpful

$HOME=/home/jdhunter
CONFIGDIR=/home/jdhunter/.matplotlib
matplotlib data path /home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/mpl-data
loaded rc file /home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc

matplotlib version 1.0.1rc1
verbose.level helpful
interactive is False
units is False
platform is linux2
font search path [’/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf’, ‘/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/afm’, ‘/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/pdfcorefonts’]

generated new fontManager
backend GTKAgg version 2.21.0
Traceback (most recent call last):
File “examples/mplot3d/subplot3d_demo.py”, line 14, in
ax = fig.add_subplot(1, 2, 1, projection=‘3d’)

File “/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/figure.py”, line 687, in add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
File “/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/axes.py”, line 8380, in init

self._axes_class.__init__(self, fig, self.figbox, **kwargs)

File “/home/jdhunter/dev/lib/python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.py”, line 77, in init
*args, **kwargs)
File “/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/axes.py”, line 448, in init

self._init_axis()

File “/home/jdhunter/dev/lib/python2.6/site-packages/mpl_toolkits/mplot3d/axes3d.py”, line 110, in _init_axis
self.xy_dataLim.intervalx, self)
File “/home/jdhunter/dev/lib/python2.6/site-packages/mpl_toolkits/mplot3d/axis3d.py”, line 89, in init

self.axes._set_artist_props(self.line)

File “/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/axes.py”, line 780, in _set_artist_props
a.set_axes(self)
File “/home/jdhunter/dev/lib/python2.6/site-packages/matplotlib/lines.py”, line 397, in set_axes

if ax.xaxis is not None:

build.out (201 KB)

···

On Wed, Jan 5, 2011 at 10:57 AM, Benjamin Root <ben.root@…553…> wrote:

def set_axes(self, ax):
    Artist.set_axes(self, ax)

if getattr(ax, ‘xaxis’, None) is not None:

        self._xcid = ax.xaxis.callbacks.connect('units', self.recache_always)
    if getattr(ax, 'yaxis', None) is not None:
        self._ycid = ax.yaxis.callbacks.connect('units', self.recache_always)







set_axes.__doc__ = Artist.set_axes.__doc__

but the problem remains.

Hmmm, let me check it out… I hope it wasn’t one of my patches that did it…

Ben Root

I initially had problems (although with the gtkagg backend…), but then I moved my development branch build to another directory to effectively hide it and then rebuilt the 1.0.1 branch, and everything worked fine. Maybe there was something in the build process that got messed up?

Very strange – this is what I am doing for a clean build and install. Can’t see where I am going wrong…
I’m also having the same problem on two platofrms (python2.4 solaris, python2.6 linux)

jdhunter@…687…:mpl1> rm -rf build ~/dev/lib/python2.6/site-packages/matplotlib* ~/.matplotlib/cache

I found the problem – failed to flush mpl_toolkits for the clean install. Line should read:

rm -rf build ~/dev/lib/python2.6/site-packages/matplotlib* ~/.matplotlib/cache ~/dev/lib/python2.6/site-packages/mpl_toolkits/

Sorry for the noise! Note to self – start using virtualevn…

JDH

···

On Wed, Jan 5, 2011 at 11:17 AM, John Hunter <jdh2358@…552…149…> wrote:

No worries!

As a side note, I have been using:

python setupegg.py develop --user

for the past year with very few headaches. It makes an egg.lnk file (in the ~/.local directory) that points back to the current code directory. Some things might get wonky with respect to things that have to be recompiled, but for pure python changes, it works very nicely. I can’t remember if it works in RHEL5, though…

Ben Root

···

On Wed, Jan 5, 2011 at 11:21 AM, John Hunter <jdh2358@…552…149…> wrote:

On Wed, Jan 5, 2011 at 11:17 AM, John Hunter <jdh2358@…149…> wrote:

Very strange – this is what I am doing for a clean build and install. Can’t see where I am going wrong…
I’m also having the same problem on two platofrms (python2.4 solaris, python2.6 linux)

jdhunter@…687…:mpl1> rm -rf build ~/dev/lib/python2.6/site-packages/matplotlib* ~/.matplotlib/cache

I found the problem – failed to flush mpl_toolkits for the clean install. Line should read:

rm -rf build ~/dev/lib/python2.6/site-packages/matplotlib* ~/.matplotlib/cache ~/dev/lib/python2.6/site-packages/mpl_toolkits/

Sorry for the noise! Note to self – start using virtualevn…

JDH