From dadce20a9b0dc33cac556321f0b5f761b64bbb21 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Jul 2012 12:24:50 -0400 Subject: [PATCH] Carry on plotting in scripts if one of the plots fails (e.g. for text waves). --- igor/script.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/igor/script.py b/igor/script.py index e14db5e..acb1a22 100644 --- a/igor/script.py +++ b/igor/script.py @@ -77,7 +77,11 @@ class Script (object): figure = _matplotlib_pyplot.figure() axes = figure.add_subplot(1, 1, 1) axes.set_title(title) - axes.plot(wave['wave']['wData'], 'r.') + try: + axes.plot(wave['wave']['wData'], 'r.') + except ValueError as error: + _LOG.error('error plotting {}: {}'.format(title, error)) + pass self._num_plots += 1 def display_plots(self): -- 2.26.2