question: protected void linearLayout ( VisualTable labels ) { Rectangle2D b = getLayoutBounds ( ) ; double breadth = getBreadth ( b ) ; double span = m_hi - m_lo ; double pspan = m_prevhi - m_prevlo ; double vlo = 0 ; if ( m_lo >= 0 ) { vlo = Math . pow ( 10 , Math . floor ( MathLib . log10 ( m_lo ) ) ) ; } else { vlo = - Math . pow ( 10 , 1 + Math . floor ( MathLib . log10 ( - m_lo ) ) ) ; } Iterator iter = labels . tuples ( ) ; while ( iter . hasNext ( ) ) { VisualItem item = ( VisualItem ) iter . next ( ) ; reset ( item ) ; double v = item . getDouble ( VALUE ) ; double x = span == 0 ? 0 : ( ( v - m_lo ) / span ) * breadth ; set ( item , x , b ) ; } Index index = labels . index ( VALUE ) ; double step = getLinearStep ( span , span == 0 ? 0 : breadth / span ) ; if ( step == 0 ) step = 1 ; int r ; for ( double x , v = vlo ; v <= m_hi ; v += step ) { x = ( ( v - m_lo ) / span ) * 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 = pspan == 0 ? 0 : ( ( v - m_prevlo ) / pspan ) ; if ( f <= 0 || f >= 1.0 ) item . setStartVisible ( true ) ; set ( item , f * breadth , b ) ; set ( item , x , b ) ; } } }
target:  Calculates a quantitative, linearly scaled layout.