public void calcAutoScale(){
  double maxNoOfMajorTicks=10;
  double maxNoOfMinorTicks=10;
  double niceRange=(Helper.calcNiceNumber(getRange(),false));
  setMajorTickSpace(Helper.calcNiceNumber(niceRange / (maxNoOfMajorTicks - 1),true));
  double niceMinValue=(Math.floor(getMinValue() / getMajorTickSpace()) * getMajorTickSpace());
  double niceMaxValue=(Math.ceil(getMaxValue() / getMajorTickSpace()) * getMajorTickSpace());
  setMinorTickSpace(Helper.calcNiceNumber(getMajorTickSpace() / (maxNoOfMinorTicks - 1),true));
  setMinValue(niceMinValue);
  setMaxValue(niceMaxValue);
}

public void calcAutoScale ( ) { double maxNoOfMajorTicks = 10 ; double maxNoOfMinorTicks = 10 ; double niceRange = ( Helper . calcNiceNumber ( getRange ( ) , false ) ) ; setMajorTickSpace ( Helper . calcNiceNumber ( niceRange / ( maxNoOfMajorTicks - 1 ) , true ) ) ; double niceMinValue = ( Math . floor ( getMinValue ( ) / getMajorTickSpace ( ) ) * getMajorTickSpace ( ) ) ; double niceMaxValue = ( Math . ceil ( getMaxValue ( ) / getMajorTickSpace ( ) ) * getMajorTickSpace ( ) ) ; setMinorTickSpace ( Helper . calcNiceNumber ( getMajorTickSpace ( ) / ( maxNoOfMinorTicks - 1 ) , true ) ) ; setMinValue ( niceMinValue ) ; setMaxValue ( niceMaxValue ) ; }
calling this method will lead to a recalculation of the scale
