This appears to have escaped my tests :-( All of the 3d examples are failing on the 1.0.1 branch -- can anyone replicate this? johnh@udesktop253: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@udesktop253: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?
On Wed, Jan 5, 2011 at 10:38 AM, John Hunter <jd...@gm...> 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.
On Wed, Jan 5, 2011 at 10:41 AM, John Hunter <jd...@gm...> wrote: > > > On Wed, Jan 5, 2011 at 10:38 AM, John Hunter <jd...@gm...> 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
On Wed, Jan 5, 2011 at 10:44 AM, Benjamin Root <ben...@ou...> wrote: > On Wed, Jan 5, 2011 at 10:41 AM, John Hunter <jd...@gm...> wrote: > >> >> >> On Wed, Jan 5, 2011 at 10:38 AM, John Hunter <jd...@gm...> 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 > > 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 11:17 AM, John Hunter <jd...@gm...> 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@uqbar: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:21 AM, John Hunter <jd...@gm...> wrote: > > > On Wed, Jan 5, 2011 at 11:17 AM, John Hunter <jd...@gm...> 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@uqbar: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 > > 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