{
max[crow] = 0;
}
+
+ int[] minC = counter.getMinColour();
+ int[] maxC = counter.getMaxColour();
+ Color minColour = new Color(minC[0], minC[1], minC[2]);
+ Color maxColour = new Color(maxC[0], maxC[1], maxC[2]);
+
for (int col = 0; col < width; col++)
{
int[] count = counts[col];
int count = counts[i][anrow];
if (count > 0)
{
- Color color = ColorUtils.getGraduatedColour(count, 0, Color.cyan,
- max[anrow], Color.blue);
+ Color color = ColorUtils.getGraduatedColour(count, 0, minColour,
+ max[anrow], maxColour);
String str = String.valueOf(count);
anns[i] = new Annotation(str, str, '0', count, color);
}
/*
* construct or update the annotation
*/
+ String description = counter.getDescriptions()[anrow];
AlignmentAnnotation ann = alignViewport.getAlignment()
.findOrCreateAnnotation(counter.getNames()[anrow],
- counter.getDescriptions()[anrow], false, null,
- null);
- ann.description = counter.getDescriptions()[anrow];
+ description, false, null, null);
+ ann.description = description;
ann.showAllColLabels = true;
ann.scaleColLabel = true;
ann.graph = AlignmentAnnotation.BAR_GRAPH;