From: John H. <jd...@gm...> - 2011-01-05 16:39:09
|
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? |