diff --git a/src/scwidgets/cue/_widget_cue_figure.py b/src/scwidgets/cue/_widget_cue_figure.py index dc12a81..80a3f47 100644 --- a/src/scwidgets/cue/_widget_cue_figure.py +++ b/src/scwidgets/cue/_widget_cue_figure.py @@ -67,6 +67,7 @@ def __init__( if matplotlib.backends.backend in [ "module://matplotlib_inline.backend_inline", "macosx", + "agg", ]: # we close the figure so the figure is only contained in this widget # and not shown using plt.show() @@ -104,6 +105,7 @@ def clear_display(self, wait=False): if matplotlib.backends.backend in [ "module://matplotlib_inline.backend_inline", "macosx", + "agg", ]: self.clear_figure() self.clear_output(wait=wait) @@ -131,6 +133,7 @@ def draw_display(self): if matplotlib.backends.backend in [ "module://matplotlib_inline.backend_inline", "macosx", + "agg", ]: with self: display(self.figure)