protected void sqrtLayout(VisualTable labels){
  Rectangle2D b=getLayoutBounds();
  double breadth=getBreadth(b);
  double span=m_hi - m_lo;
  double splo=MathLib.safeSqrt(m_prevlo);
  double spspan=MathLib.safeSqrt(m_prevhi) - splo;
  double vlo=Math.pow(10,Math.floor(MathLib.safeLog10(m_lo)));
  double slo=MathLib.safeSqrt(m_lo);
  double sspan=MathLib.safeSqrt(m_hi) - slo;
  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);
    }
  }
}

protected void sqrtLayout ( VisualTable labels ) { Rectangle2D b = getLayoutBounds ( ) ; double breadth = getBreadth ( b ) ; double span = m_hi - m_lo ; double splo = MathLib . safeSqrt ( m_prevlo ) ; double spspan = MathLib . safeSqrt ( m_prevhi ) - splo ; double vlo = Math . pow ( 10 , Math . floor ( MathLib . safeLog10 ( m_lo ) ) ) ; double slo = MathLib . safeSqrt ( m_lo ) ; double sspan = MathLib . safeSqrt ( m_hi ) - slo ; 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 ) ; } } }
calculates a quantitative , square root scaled layout .
