for (int anrow = 0; anrow < rows; anrow++)
{
Annotation[] anns = new Annotation[width];
+ long rmax = 0;
/*
- * add non-zero counts as annotations
+ * add counts as annotations. zeros are needed since select-by-annotation ignores empty annotation positions
*/
for (int i = 0; i < counts.length; i++)
{
String str = String.valueOf(count);
anns[i] = new Annotation(str, str, '0', count, color);
}
+ rmax = Long.max(count, rmax);
}
/*
ann.scaleColLabel = true;
ann.graph = AlignmentAnnotation.BAR_GRAPH;
ann.annotations = anns;
- setGraphMinMax(ann, anns);
+ ann.graphMin = 0f; // minimum always zero count
+ ann.graphMax = rmax; // maximum count from loop over feature columns
ann.validateRangeAndDisplay();
if (!ourAnnots.contains(ann))
{