@Override public double valueToJava2D(double value,Rectangle2D plotArea,RectangleEdge edge){
  Range range=getRange();
  double axisMin=switchedLog10(range.getLowerBound());
  double axisMax=switchedLog10(range.getUpperBound());
  double min=0.0;
  double max=0.0;
  if (RectangleEdge.isTopOrBottom(edge)) {
    min=plotArea.getMinX();
    max=plotArea.getMaxX();
  }
 else   if (RectangleEdge.isLeftOrRight(edge)) {
    min=plotArea.getMaxY();
    max=plotArea.getMinY();
  }
  value=switchedLog10(value);
  if (isInverted()) {
    return max - (((value - axisMin) / (axisMax - axisMin)) * (max - min));
  }
 else {
    return min + (((value - axisMin) / (axisMax - axisMin)) * (max - min));
  }
}

@ Override public double valueToJava2D ( double value , Rectangle2D plotArea , RectangleEdge edge ) { Range range = getRange ( ) ; double axisMin = switchedLog10 ( range . getLowerBound ( ) ) ; double axisMax = switchedLog10 ( range . getUpperBound ( ) ) ; double min = 0.0 ; double max = 0.0 ; if ( RectangleEdge . isTopOrBottom ( edge ) ) { min = plotArea . getMinX ( ) ; max = plotArea . getMaxX ( ) ; } else if ( RectangleEdge . isLeftOrRight ( edge ) ) { min = plotArea . getMaxY ( ) ; max = plotArea . getMinY ( ) ; } value = switchedLog10 ( value ) ; if ( isInverted ( ) ) { return max - ( ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( max - min ) ) ; } else { return min + ( ( ( value - axisMin ) / ( axisMax - axisMin ) ) * ( max - min ) ) ; } }
converts a data value to a coordinate in java2d space , assuming that the axis runs along one edge of the specified plotarea . note that it is possible for the coordinate to fall outside the plotarea .
