Procházet zdrojové kódy

Changed plotmpl.py/plot.py to not treat missing values as discontinuities

Christopher Haster před 3 roky
rodič
revize
6fce9e5156
2 změnil soubory, kde provedl 10 přidání a 12 odebrání
  1. 5 6
      scripts/plot.py
  2. 5 6
      scripts/plotmpl.py

+ 5 - 6
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
 

+ 5 - 6
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