@Override protected void autoAdjustRange(){
  Plot plot=getPlot();
  if (plot == null) {
    return;
  }
  if (plot instanceof ValueAxisPlot) {
    ValueAxisPlot vap=(ValueAxisPlot)plot;
    Range r=vap.getDataRange(this);
    if (r == null) {
      r=getDefaultAutoRange();
    }
    double upper=r.getUpperBound();
    double lower=Math.max(r.getLowerBound(),this.smallestValue);
    double range=upper - lower;
    double fixedAutoRange=getFixedAutoRange();
    if (fixedAutoRange > 0.0) {
      lower=Math.max(upper - fixedAutoRange,this.smallestValue);
    }
 else {
      double minRange=getAutoRangeMinimumSize();
      if (range < minRange) {
        double expand=(minRange - range) / 2;
        upper=upper + expand;
        lower=lower - expand;
      }
      double logUpper=calculateLog(upper);
      double logLower=calculateLog(lower);
      double logRange=logUpper - logLower;
      logUpper=logUpper + getUpperMargin() * logRange;
      logLower=logLower - getLowerMargin() * logRange;
      upper=calculateValueNoINF(logUpper);
      lower=calculateValueNoINF(logLower);
    }
    setRange(new Range(lower,upper),false,false);
  }
}

@ Override protected void autoAdjustRange ( ) { Plot plot = getPlot ( ) ; if ( plot == null ) { return ; } if ( plot instanceof ValueAxisPlot ) { ValueAxisPlot vap = ( ValueAxisPlot ) plot ; Range r = vap . getDataRange ( this ) ; if ( r == null ) { r = getDefaultAutoRange ( ) ; } double upper = r . getUpperBound ( ) ; double lower = Math . max ( r . getLowerBound ( ) , this . smallestValue ) ; double range = upper - lower ; double fixedAutoRange = getFixedAutoRange ( ) ; if ( fixedAutoRange > 0.0 ) { lower = Math . max ( upper - fixedAutoRange , this . smallestValue ) ; } else { double minRange = getAutoRangeMinimumSize ( ) ; if ( range < minRange ) { double expand = ( minRange - range ) / 2 ; upper = upper + expand ; lower = lower - expand ; } double logUpper = calculateLog ( upper ) ; double logLower = calculateLog ( lower ) ; double logRange = logUpper - logLower ; logUpper = logUpper + getUpperMargin ( ) * logRange ; logLower = logLower - getLowerMargin ( ) * logRange ; upper = calculateValueNoINF ( logUpper ) ; lower = calculateValueNoINF ( logLower ) ; } setRange ( new Range ( lower , upper ) , false , false ) ; } }
adjusts the axis range to match the data range that the axis is required to display .
