diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index f59255a9c4a8..592ea2e05b34 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -197,19 +197,24 @@ def set_top_view(self): def _init_axis(self): '''Init 3D axes; overrides creation of regular X/Y axes''' - self.w_xaxis = axis3d.XAxis('x', self.xy_viewLim.intervalx, - self.xy_dataLim.intervalx, self) - self.xaxis = self.w_xaxis - self.w_yaxis = axis3d.YAxis('y', self.xy_viewLim.intervaly, - self.xy_dataLim.intervaly, self) - self.yaxis = self.w_yaxis - self.w_zaxis = axis3d.ZAxis('z', self.zz_viewLim.intervalx, - self.zz_dataLim.intervalx, self) - self.zaxis = self.w_zaxis + self.xaxis = axis3d.XAxis('x', self.xy_viewLim.intervalx, + self.xy_dataLim.intervalx, self) + self.yaxis = axis3d.YAxis('y', self.xy_viewLim.intervaly, + self.xy_dataLim.intervaly, self) + self.zaxis = axis3d.ZAxis('z', self.zz_viewLim.intervalx, + self.zz_dataLim.intervalx, self) + # Provide old aliases + self.w_xaxis = self.xaxis + self.w_yaxis = self.yaxis + self.w_zaxis = self.zaxis for ax in self.xaxis, self.yaxis, self.zaxis: ax.init3d() + def get_zaxis(self): + '''Return the ``ZAxis`` (`~.axis3d.Axis`) instance.''' + return self.zaxis + def _get_axis_list(self): return super()._get_axis_list() + (self.zaxis, ) @@ -2446,8 +2451,7 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None, 6. +X zsort : str, optional - The z-axis sorting scheme passed onto - :func:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection` + The z-axis sorting scheme passed onto `~.art3d.Poly3DCollection` shade : bool, optional (default = True) When true, this shades the dark sides of the bars (relative @@ -2455,11 +2459,11 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None, **kwargs Any additional keyword arguments are passed onto - :class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection` + `~.art3d.Poly3DCollection`. Returns ------- - collection : Poly3DCollection + collection : `~.art3d.Poly3DCollection` A collection of three dimensional polygons representing the bars. """ diff --git a/lib/mpl_toolkits/mplot3d/axis3d.py b/lib/mpl_toolkits/mplot3d/axis3d.py index 8b1d40fbec2d..c2068dfabb69 100644 --- a/lib/mpl_toolkits/mplot3d/axis3d.py +++ b/lib/mpl_toolkits/mplot3d/axis3d.py @@ -45,7 +45,7 @@ def tick_update_position(tick, tickxs, tickys, labelpos): class Axis(maxis.XAxis): - + """An Axis class for the 3D plots. """ # These points from the unit cube make up the x, y and z-planes _PLANES = ( (0, 3, 7, 4), (1, 2, 6, 5), # yz planes