Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7c3b00

Browse filesBrowse files
get_zaxis method for 3d axes
1 parent 6665bc7 commit e7c3b00
Copy full SHA for e7c3b00

File tree

Expand file treeCollapse file tree

2 files changed

+17
-12
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-12
lines changed

‎lib/mpl_toolkits/mplot3d/axes3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axes3d.py
+16-11Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,24 @@ def set_top_view(self):
192192

193193
def _init_axis(self):
194194
'''Init 3D axes; overrides creation of regular X/Y axes'''
195-
self.w_xaxis = axis3d.XAxis('x', self.xy_viewLim.intervalx,
195+
self.xaxis = axis3d.XAxis('x', self.xy_viewLim.intervalx,
196196
self.xy_dataLim.intervalx, self)
197-
self.xaxis = self.w_xaxis
198-
self.w_yaxis = axis3d.YAxis('y', self.xy_viewLim.intervaly,
197+
self.yaxis = axis3d.YAxis('y', self.xy_viewLim.intervaly,
199198
self.xy_dataLim.intervaly, self)
200-
self.yaxis = self.w_yaxis
201-
self.w_zaxis = axis3d.ZAxis('z', self.zz_viewLim.intervalx,
199+
self.zaxis = axis3d.ZAxis('z', self.zz_viewLim.intervalx,
202200
self.zz_dataLim.intervalx, self)
203-
self.zaxis = self.w_zaxis
201+
# Provide old aliases
202+
self.w_xaxis = self.xaxis
203+
self.w_yaxis = self.yaxis
204+
self.w_zaxis = self.zaxis
204205

205206
for ax in self.xaxis, self.yaxis, self.zaxis:
206207
ax.init3d()
207208

209+
def get_zaxis(self):
210+
'''Return the ``ZAxis`` (`~.axis3d.Axis`) instance.'''
211+
return self.zaxis
212+
208213
def get_children(self):
209214
return [self.zaxis] + super().get_children()
210215

@@ -2434,19 +2439,19 @@ def bar3d(self, x, y, z, dx, dy, dz, color=None,
24342439
6. +X
24352440
24362441
zsort : str, optional
2437-
The z-axis sorting scheme passed onto
2438-
:func:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
2442+
The z-axis sorting scheme passed onto `~.art3d.Poly3DCollection`
24392443
24402444
shade : bool, optional (default = True)
24412445
When true, this shades the dark sides of the bars (relative
24422446
to the plot's source of light).
24432447
2444-
Any additional keyword arguments are passed onto
2445-
:func:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`
2448+
**kwargs :
2449+
Any additional keyword arguments are passed onto
2450+
`~.art3d.Poly3DCollection`.
24462451
24472452
Returns
24482453
-------
2449-
collection : Poly3DCollection
2454+
collection : `~.art3d.Poly3DCollection`
24502455
A collection of three dimensional polygons representing
24512456
the bars.
24522457
"""

‎lib/mpl_toolkits/mplot3d/axis3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/mplot3d/axis3d.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def tick_update_position(tick, tickxs, tickys, labelpos):
4343
tick.gridline.set_data(0, 0)
4444

4545
class Axis(maxis.XAxis):
46-
46+
"""An Axis class for the 3D plots. """
4747
# These points from the unit cube make up the x, y and z-planes
4848
_PLANES = (
4949
(0, 3, 7, 4), (1, 2, 6, 5), # yz planes

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.