public static String shadefloat ( float d , float max ) { int a = ( int ) Math . floor ( d * 10 / max + 0.5 ) ; if ( a > 10 || a < 0 ) { String x = lnf . format ( d ) ; a = 5 - x . length ( ) ; for ( int i = 0 ; i < a ; i ++ ) { x += " " ; } return "<" + x + ">" ; } return "[" + shades [ a ] + "]" ; }
create a string representation whose gray value appears as an indicator of magnitude cf . Hinton diagrams in statistics .