8000 FIX: use transform with mplot3d · matplotlib/matplotlib@c289e01 · GitHub
[go: up one dir, main page]

Skip to content

Commit c289e01

Browse files
committed
FIX: use transform with mplot3d
1 parent a4cc0fc commit c289e01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mpl_toolkits/mplot3d/axis3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ def draw(self, renderer):
260260
lxyz = 0.5 * (edgep1 + edgep2)
261261

262262
# A rough estimate; points are ambiguous since 3D plots rotate
263-
ax_scale = self.axes.bbox.size / self.figure.bbox.size
264-
ax_inches = np.multiply(ax_scale, self.figure.get_size_inches())
263+
reltoinches = self.figure.dpi_scale_trans.inverted()
264+
ax_inches = reltoinches.transform(self.axes.bbox.size)
265265
ax_points_estimate = sum(72. * ax_inches)
266266
deltas_per_point = 48 / ax_points_estimate
267267
default_offset = 21.

0 commit comments

Comments
 (0)
0