diff --git a/yt/visualization/base_plot_types.py b/yt/visualization/base_plot_types.py index 716ee7c9bd5..263a563f695 100644 --- a/yt/visualization/base_plot_types.py +++ b/yt/visualization/base_plot_types.py @@ -49,8 +49,8 @@ class FormatKwargs(TypedDict): "GTKAgg": ["backend_gtkagg", "FigureCanvasGTKAgg", None], "GTKCairo": ["backend_gtkcairo", "FigureCanvasGTKCairo", None], "MacOSX": ["backend_macosx", "FigureCanvasMac", "FigureManagerMac"], - "Qt4Agg": ["backend_qt4agg", "FigureCanvasQTAgg", None], "Qt5Agg": ["backend_qt5agg", "FigureCanvasQTAgg", None], + "QtAgg": ["backend_qtagg", "FigureCanvasQTAgg", None], "TkAgg": ["backend_tkagg", "FigureCanvasTkAgg", None], "WX": ["backend_wx", "FigureCanvasWx", None], "WXAgg": ["backend_wxagg", "FigureCanvasWxAgg", None], @@ -155,10 +155,7 @@ def _get_canvas_classes(self): else: key = "agg" - try: - module, fig_canvas, fig_manager = BACKEND_SPECS[key] - except KeyError: - return + module, fig_canvas, fig_manager = BACKEND_SPECS[key] mod = __import__( "matplotlib.backends",