Skip to content

Commit d55706c

Browse files
More intuitive scaling
1 parent 0c2864d commit d55706c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ def _set_view_from_bbox(self, bbox, direction='in',
12131213
dy = abs(start_y - stop_y)
12141214
scale_u = dx / (self.bbox.max[0] - self.bbox.min[0])
12151215
scale_v = dy / (self.bbox.max[1] - self.bbox.min[1])
1216-
scale_w = 1
1216+
scale_w = max(scale_u, scale_v)
12171217

12181218
# Limit box zoom to reasonable range, protect for divide by zero below
12191219
scale_u = np.clip(scale_u, 1e-2, 1e2)

0 commit comments

Comments
 (0)