calculate max and min for graph
authoramwaterhouse <Andrew Waterhouse>
Thu, 19 May 2005 17:50:45 +0000 (17:50 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 19 May 2005 17:50:45 +0000 (17:50 +0000)
src/jalview/datamodel/AlignmentAnnotation.java

index 43ebf38..8635505 100755 (executable)
@@ -42,6 +42,21 @@ public class AlignmentAnnotation
     this.description = description;\r
     this.annotations = annotations;\r
     isGraph = true;\r
+    if(min==max)\r
+    {\r
+      for(int i=0; i<annotations.length; i++)\r
+      {\r
+        if(annotations[i]==null)\r
+          continue;\r
+        if(annotations[i].value>max)\r
+          max = annotations[i].value;\r
+        if(annotations[i].value<min)\r
+          min = annotations[i].value;\r
+      }\r
+\r
+\r
+    }\r
+\r
     graphMin = min;\r
     graphMax = max;\r
     windowLength = winLength;\r