diff --git a/mpl_gui/_manage_backend.py b/mpl_gui/_manage_backend.py index 6e51de2..a9b62fc 100644 --- a/mpl_gui/_manage_backend.py +++ b/mpl_gui/_manage_backend.py @@ -5,6 +5,7 @@ from matplotlib import cbook, rcsetup from matplotlib import rcParams, rcParamsDefault +from matplotlib.backends.registry import backend_registry import matplotlib.backend_bases @@ -92,7 +93,7 @@ def select_gui_toolkit(newbackend=None): if newbackend.lower() == "tkagg": backend_name = f"mpl_gui._patched_backends.{newbackend.lower()}" else: - backend_name = cbook._backend_module_name(newbackend) + backend_name = backend_registry._backend_module_name(newbackend) mod = importlib.import_module(backend_name) if hasattr(mod, "Backend"): diff --git a/requirements.txt b/requirements.txt index 7260f92..188b1f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ # List required packages in this file, one per line. -matplotlib +matplotlib>3.9