We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24ccb6e commit 4b2b829Copy full SHA for 4b2b829
lib/matplotlib/text.py
@@ -275,8 +275,11 @@ def _get_layout(self, renderer):
275
baseline = None
276
for i, line in enumerate(lines):
277
clean_line, ismath = self.is_math_text(line)
278
- w, h, d = renderer.get_text_width_height_descent(
279
- clean_line, self._fontproperties, ismath=ismath)
+ if clean_line:
+ w, h, d = renderer.get_text_width_height_descent(
280
+ clean_line, self._fontproperties, ismath=ismath)
281
+ else:
282
+ w, h, d = 0, 0, 0
283
if baseline is None:
284
baseline = h - d
285
whs[i] = w, h
0 commit comments