Skip to content

Commit 4ea04b4

Browse files
committed
_enable_matplotlib_integration: fix version incompatibility
1 parent 394d7ea commit 4ea04b4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

matplotlib_inline/backend_inline.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,11 @@ def _enable_matplotlib_integration():
212212

213213
import matplotlib
214214

215-
if matplotlib.__version_info__ >= (3, 10):
215+
version = matplotlib.__version_info__
216+
if version >= (3, 10):
216217
backend = matplotlib.get_backend(auto_select=False)
218+
elif version >= (3, 5):
219+
backend = matplotlib.get_backend()
217220
else:
218221
backend = matplotlib.rcParams._get("backend")
219222

0 commit comments

Comments
 (0)