From 8e2490e6ac47d661cc4dbec478d123a8316f9325 Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 22 Mar 2010 17:14:51 +0000 Subject: [PATCH] todo and sensible default setting of min/max for histograms and line graphs to include 0 --- src/jalview/datamodel/AlignmentAnnotation.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index d8ad4fc..a3328b3 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -203,7 +203,7 @@ public class AlignmentAnnotation && firstChar != '-' && firstChar < jalview.schemes.ResidueProperties.aaIndex.length) { - if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23) + if (jalview.schemes.ResidueProperties.aaIndex[firstChar] < 23) // TODO: parameterise to gap symbol number { nonSSLabel = true; } @@ -310,6 +310,15 @@ public class AlignmentAnnotation min = annotations[i].value; } } + // ensure zero is origin for min/max ranges on only one side of zero + if (min>0) { + min = 0; + } else { + if (max<0) + { + max = 0; + } + } } graphMin = min; -- 1.7.10.2