9
9
Module containing Axes3D, an object which can plot 3D objects on a
10
10
2D matplotlib figure.
11
11
"""
12
+
12
13
from collections import defaultdict
13
14
from functools import reduce
14
15
import math
@@ -140,14 +141,6 @@ def set_axis_on(self):
140
141
self ._axis3don = True
141
142
self .stale = True
142
143
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
-
151
144
def convert_zunits (self , z ):
152
145
"""
153
146
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,
187
180
def set_top_view (self ):
188
181
# this happens to be the right view for the viewing coordinates
189
182
# 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
195
187
# This is purposely using the 2D Axes's set_xlim and set_ylim,
196
188
# because we are trying to place our viewing pane.
197
189
super ().set_xlim (- xdwl , xdw , auto = None )
@@ -1088,12 +1080,8 @@ def can_pan(self):
1088
1080
return False
1089
1081
1090
1082
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
+
1097
1085
super ().cla ()
1098
1086
self .zaxis .cla ()
1099
1087
@@ -1116,12 +1104,10 @@ def cla(self):
1116
1104
self .grid (rcParams ['axes3d.grid' ])
1117
1105
1118
1106
def disable_mouse_rotation (self ):
1119
- """Disable mouse button callbacks.
1120
- """
1107
+ """Disable mouse button callbacks."""
1121
1108
# Disconnect the various events we set.
1122
1109
for cid in self ._cids :
1123
1110
self .figure .canvas .mpl_disconnect (cid )
1124
-
1125
1111
self ._cids = []
1126
1112
1127
1113
def _button_press (self , event ):
0 commit comments