jas2.plot
Class DoubleAxis
- java.lang.Object
-
- jas2.plot.AxisType
-
- jas2.plot.DoubleAxis
-
- All Implemented Interfaces:
- CoordinateTransformation, DoubleCoordinateTransformation, Transformation, java.io.Externalizable, java.io.Serializable
public final class DoubleAxis extends AxisType implements DoubleCoordinateTransformation
Implements a simple numeric axis, with either linear or logarithmic scale. Users may set a flag that determines whether the axis may round to close values for simplicity of labels or whether the axis should keep to the given range. If, for example, the minimum is set to 4.3 and the maximum is set to 95.9, this class may be configured to round the extrema so that the labels are 0, 10, 20, ..., 100. UsesetUseSuggestedRange(boolean)to set whether a pretty range is automatically used.- See Also:
setUseSuggestedRange(boolean), Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DoubleAxis()Creates linear axis.DoubleAxis(boolean logarithmic)Creates a new numeric axis.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleconvert(double d)Returns a pixel value for a given double value.CoordinateTransformationgetCoordinateTransformation()Returns an instance ofDoubleCoordinateTransformation.doublegetDataMax()Returns the maximum of the data on the axis, as given to the methodsetMax().doublegetDataMin()Returns the minimum of the data on the axis, as given to the methodsetMin().doublegetIntersection()doublegetPlotMax()Returns the maximum of the axis range.doublegetPlotMin()Returns the minimum of the axis range.booleangetUseSuggestedRange()booleanisLogarithmic()voidreadExternal(java.io.ObjectInput in)voidsetLogarithmic(boolean logarithmic)voidsetMax(double data_max)voidsetMin(double data_min)voidsetUseSuggestedRange(boolean useSuggestedRange)doubleunConvert(double d)Returns a double value for a given pixel.voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
DoubleAxis
public DoubleAxis()
Creates linear axis.
-
DoubleAxis
public DoubleAxis(boolean logarithmic)
Creates a new numeric axis.- Parameters:
logarithmic- whether the axis uses logarithmic (as opposed to liear) scale
-
-
Method Detail
-
setLogarithmic
public void setLogarithmic(boolean logarithmic)
-
isLogarithmic
public boolean isLogarithmic()
-
setUseSuggestedRange
public void setUseSuggestedRange(boolean useSuggestedRange)
-
getUseSuggestedRange
public boolean getUseSuggestedRange()
-
setMin
public void setMin(double data_min)
-
setMax
public void setMax(double data_max)
-
getPlotMin
public double getPlotMin()
Returns the minimum of the axis range.- Specified by:
getPlotMinin interfaceDoubleCoordinateTransformation
-
getPlotMax
public double getPlotMax()
Returns the maximum of the axis range.- Specified by:
getPlotMaxin interfaceDoubleCoordinateTransformation
-
getDataMin
public double getDataMin()
Returns the minimum of the data on the axis, as given to the methodsetMin().- See Also:
setMin(double)
-
getDataMax
public double getDataMax()
Returns the maximum of the data on the axis, as given to the methodsetMax().- See Also:
setMax(double)
-
getCoordinateTransformation
public CoordinateTransformation getCoordinateTransformation()
Returns an instance ofDoubleCoordinateTransformation.- See Also:
DoubleCoordinateTransformation
-
convert
public double convert(double d)
Description copied from interface:DoubleCoordinateTransformationReturns a pixel value for a given double value.- Specified by:
convertin interfaceDoubleCoordinateTransformation- Specified by:
convertin interfaceTransformation
-
unConvert
public double unConvert(double d)
Description copied from interface:DoubleCoordinateTransformationReturns a double value for a given pixel.- Specified by:
unConvertin interfaceDoubleCoordinateTransformation
-
getIntersection
public double getIntersection()
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG