Skip to content

Commit caeff1b

Browse files
Linting
1 parent 0008c02 commit caeff1b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1243,15 +1243,16 @@ def zoom_data_limits(self, scale_u, scale_v, scale_w):
12431243

12441244
# Only perform frame conversion if unequal scale factors
12451245
if not np.allclose(scale, scale_u):
1246-
# Convert from the scale factors in the view frame to the data frame
1246+
# Convert the scale factors from the view frame to the data frame
12471247
R = np.array([self._view_u, self._view_v, self._view_w])
12481248
S = scale * np.eye(3)
12491249
scale = np.linalg.norm(R.T @ S, axis=1)
12501250

12511251
# Set the constrained scale factors to the factor closest to 1
12521252
if self._aspect in ('equal', 'equalxy', 'equalxz', 'equalyz'):
1253-
ax_idx = self._equal_aspect_axis_indices(self._aspect)
1254-
scale[ax_idx] = scale[ax_idx][np.argmin(np.abs(scale[ax_idx] - 1))]
1253+
ax_idxs = self._equal_aspect_axis_indices(self._aspect)
1254+
min_ax_idxs = np.argmin(np.abs(scale[ax_idxs] - 1))
1255+
scale[ax_idxs] = scale[ax_idxs][min_ax_idxs]
12551256

12561257
self.scale_axis_limits(scale[0], scale[1], scale[2])
12571258

0 commit comments

Comments
 (0)