We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1a772e commit 6f01dc4Copy full SHA for 6f01dc4
1 file changed
adjustText/__init__.py
@@ -410,7 +410,15 @@ def adjust_text(
410
return
411
if ax is None:
412
ax = plt.gca()
413
- ax.figure.draw_without_rendering()
+ try:
414
+ ax.figure.draw_without_rendering()
415
+ except AttributeError:
416
+ logging.warn(
417
+ """Looks like you are using an old matplotlib version.
418
+ In some cases adjust_text might fail, if possible update
419
+ matplotlib to version >=3.5.0"""
420
+ )
421
+ ax.figure.canvas.draw()
422
try:
423
transform = texts[0].get_transform()
424
except IndexError:
0 commit comments