diff --git a/scripts/plot.py b/scripts/plot.py index a163b7e0..d2e64017 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -479,12 +479,11 @@ def dataset(results, x=None, y=None, define=[]): # find ys if y is not None: if y not in r: - y_ = None - else: - try: - y_ = dat(r[y]) - except ValueError: - y_ = None + continue + try: + y_ = dat(r[y]) + except ValueError: + continue else: y_ = None diff --git a/scripts/plotmpl.py b/scripts/plotmpl.py index bdb3c349..52286525 100755 --- a/scripts/plotmpl.py +++ b/scripts/plotmpl.py @@ -230,12 +230,11 @@ def dataset(results, x=None, y=None, define=[]): # find ys if y is not None: if y not in r: - y_ = None - else: - try: - y_ = dat(r[y]) - except ValueError: - y_ = None + continue + try: + y_ = dat(r[y]) + except ValueError: + continue else: y_ = None