private void computeYAxisStops(float minY,float maxY){
  int start=(int)minY;
  int end=(int)Math.ceil(maxY);
  float range=end - start;
  if (range < 0) {
    return;
  }
  int stepsCount=2;
  if (range == 0) {
    start-=stepsCount;
    end+=stepsCount;
  }
  int interval=range == 0 ? stepsCount : (int)Math.ceil(range / stepsCount);
  while (start + interval * stepsCount <= end) {
    stepsCount++;
    interval=range == 0 ? stepsCount : (int)Math.ceil(range / stepsCount);
  }
  float value=start;
  int n=1;
  while (value <= end) {
    value+=interval;
    n++;
  }
  yStops.numStops=n;
  if (yStops.stops.length < n) {
    yStops.stops=new float[n];
  }
  value=start;
  for (int i=0; i < n; i++, value+=interval) {
    yStops.stops[i]=value;
  }
}

private void computeYAxisStops ( float minY , float maxY ) { int start = ( int ) minY ; int end = ( int ) Math . ceil ( maxY ) ; float range = end - start ; if ( range < 0 ) { return ; } int stepsCount = 2 ; if ( range == 0 ) { start -= stepsCount ; end += stepsCount ; } int interval = range == 0 ? stepsCount : ( int ) Math . ceil ( range / stepsCount ) ; while ( start + interval * stepsCount <= end ) { stepsCount ++ ; interval = range == 0 ? stepsCount : ( int ) Math . ceil ( range / stepsCount ) ; } float value = start ; int n = 1 ; while ( value <= end ) { value += interval ; n ++ ; } yStops . numStops = n ; if ( yStops . stops . length < n ) { yStops . stops = new float [ n ] ; } value = start ; for ( int i = 0 ; i < n ; i ++ , value += interval ) { yStops . stops [ i ] = value ; } }
compute stops for y axis
