8000 Workaround Text3D breaking tight_layout() · matplotlib/matplotlib@a524fd7 · GitHub
[go: up one dir, main page]

Skip to content

Commit a524fd7

Browse files
committed
Workaround Text3D breaking tight_layout()
1 parent 5e2e9c2 commit a524fd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ def draw(self, renderer):
113113
mtext.Text.draw(self, renderer)
114114
self.stale = False
115115

116+
def get_tightbbox(self, renderer):
117+
# Overwriting the 2d Text behavior which is not valid for 3d.
118+
# For now, just return None to exclude from layout calculation.
119+
return None
116120

117121
def text_2d_to_3d(obj, z=0, zdir='z'):
118122
"""Convert a Text to a Text3D object."""

0 commit comments

Comments
 (0)
0