question: public void calcMinorTick ( ) { minorTick = majorTick ; double u = minorTick ; double r = majorTick ; minorTickCount = ( int ) ( r / u ) ; while ( minorTickCount < prefMinorTickCount ) { if ( fraction != QUARTERS ) { u = minorTick / 2 ; if ( ! isDiscrete || u == Math . floor ( u ) ) { minorTickCount = ( int ) ( r / u ) ; if ( minorTickCount >= prefMinorTickCount ) break ; } u = minorTick / 4 ; if ( ! isDiscrete || u == Math . floor ( u ) ) { minorTickCount = ( int ) ( r / u ) ; if ( minorTickCount >= prefMinorTickCount ) break ; } } u = minorTick / 5 ; if ( ! isDiscrete || u == Math . floor ( u ) ) { minorTickCount = ( int ) ( r / u ) ; if ( minorTickCount >= prefMinorTickCount ) break ; } if ( isDiscrete && ( minorTick / 10 ) != Math . floor ( minorTick / 10 ) ) { u = minorTick ; minorTickCount = ( int ) ( r / u ) ; break ; } minorTick /= 10 ; u = minorTick ; minorTickCount = ( int ) ( r / u ) ; } minorTick = u ; minorTickCount -- ; }
target:  Calculate the optimum minor tick distance. Override to change default behaviour