double sspan = MathLib.safeSqrt(m_hi)-slo;
// mark previously visible labels
Iterator iter = labels.tuples();
while ( iter.hasNext() ) {
VisualItem item = (VisualItem)iter.next();
reset(item);
double v = item.getDouble(VALUE);
double x = span==0 ? 0 : ((MathLib.safeSqrt(v)-slo)/sspan)*breadth;
set(item, x, b);
}
Index index = labels.index(VALUE);
double step = getLinearStep(span, breadth/span);
if ( step == 0 ) step = 1;
int r;
for ( double x, v=vlo; v<=m_hi; v+=step ) {
x = ((MathLib.safeSqrt(v)-slo)/sspan)*breadth;
if ( x < -0.5 ) {
continue;
} else if ( (r=index.get(v)) >= 0 ) {
VisualItem item = labels.getItem(r);
item.setVisible(true);
item.setEndVisible(true);
} else {
VisualItem item = labels.addItem();
item.set(LABEL, m_nf.format(v));
item.setDouble(VALUE, v);
double f = spspan==0 ? 0 : ((MathLib.safeSqrt(v)-splo)/spspan);
if ( f <= 0 || f >= 1.0 ) {
item.setStartVisible(true);
}
set(item, f*breadth, b);
set(item, x, b);
}
}