From: Jim Procter Date: Thu, 27 Apr 2017 10:57:50 +0000 (+0100) Subject: JAL-1933 shade occupancy from light grey to black for high -> low occupancy X-Git-Tag: Release_2_10_2~3^2~124^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0af11fd54aa58f2b17e5f940391cb880e61bc57f;p=jalview.git JAL-1933 shade occupancy from light grey to black for high -> low occupancy --- diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index ddf1bbb..3636b5e 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -20,10 +20,6 @@ */ package jalview.analysis; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.List; - import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; @@ -41,6 +37,11 @@ import jalview.util.Format; import jalview.util.MappingUtils; import jalview.util.QuickSort; +import java.awt.Color; +import java.util.Arrays; +import java.util.Hashtable; +import java.util.List; + /** * Takes in a vector or array of sequences and column start and column end and * returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied. @@ -315,6 +316,7 @@ public class AAFrequency // always set ranges again gaprow.graphMax = nseq; gaprow.graphMin = 0; + double scale = 0.8/nseq; for (int i = startCol; i < endCol; i++) { ProfileI profile = profiles.get(i); @@ -333,8 +335,8 @@ public class AAFrequency String description = ""; gaprow.annotations[i] = new Annotation(description, description, - '\0', - gapped); + '\0', gapped, jalview.util.ColorUtils.bleachColour( + Color.DARK_GRAY, (float) scale * gapped)); } }