From 9987c039c707101b21eaed4ce3de17f7259bd73b Mon Sep 17 00:00:00 2001 From: Tom Aldcroft Date: Tue, 12 May 2020 17:57:51 -0400 Subject: [PATCH] Only plt.show() for non-interactive backend --- proseco/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proseco/core.py b/proseco/core.py index 8746cd1d..1ca0caf4 100644 --- a/proseco/core.py +++ b/proseco/core.py @@ -507,7 +507,8 @@ def plot(self, ax=None, **kwargs): kwargs.setdefault('bad_stars', np.zeros(len(kwargs['stars']), dtype=bool)) fig = plot_stars(attitude=self.att, ax=ax, **kwargs) - plt.show() + if 'agg' not in plt.get_backend().lower(): + plt.show() return fig