99Module containing Axes3D, an object which can plot 3D objects on a
10102D matplotlib figure.
1111"""
12+
1213from collections import defaultdict
1314from functools import reduce
1415import math
@@ -140,14 +141,6 @@ def set_axis_on(self):
140141 self ._axis3don = True
141142 self .stale = True
142143
143- def have_units (self ):
144- """
145- Return *True* if units are set on the *x*, *y*, or *z* axes
146-
147- """
148- return (self .xaxis .have_units () or self .yaxis .have_units () or
149- self .zaxis .have_units ())
150-
151144 def convert_zunits (self , z ):
152145 """
153146 For artists in an axes, if the zaxis has units support,
@@ -187,11 +180,10 @@ def _process_unit_info(self, xdata=None, ydata=None, zdata=None,
187180 def set_top_view (self ):
188181 # this happens to be the right view for the viewing coordinates
189182 # moved up and to the left slightly to fit labels and axes
190- xdwl = (0.95 / self .dist )
191- xdw = (0.9 / self .dist )
192- ydwl = (0.95 / self .dist )
193- ydw = (0.9 / self .dist )
194-
183+ xdwl = 0.95 / self .dist
184+ xdw = 0.9 / self .dist
185+ ydwl = 0.95 / self .dist
186+ ydw = 0.9 / self .dist
195187 # This is purposely using the 2D Axes's set_xlim and set_ylim,
196188 # because we are trying to place our viewing pane.
197189 super ().set_xlim (- xdwl , xdw , auto = None )
@@ -1088,12 +1080,8 @@ def can_pan(self):
10881080 return False
10891081
10901082 def cla (self ):
1091- """
1092- Clear axes
1093- """
1094- # Disabling mouse interaction might have been needed a long
1095- # time ago, but I can't find a reason for it now - BVR (2012-03)
1096- #self.disable_mouse_rotation()
1083+ # docstring inherited.
1084+
10971085 super ().cla ()
10981086 self .zaxis .cla ()
10991087
@@ -1116,12 +1104,10 @@ def cla(self):
11161104 self .grid (rcParams ['axes3d.grid' ])
11171105
11181106 def disable_mouse_rotation (self ):
1119- """Disable mouse button callbacks.
1120- """
1107+ """Disable mouse button callbacks."""
11211108 # Disconnect the various events we set.
11221109 for cid in self ._cids :
11231110 self .figure .canvas .mpl_disconnect (cid )
1124-
11251111 self ._cids = []
11261112
11271113 def _button_press (self , event ):
0 commit comments