public final class AxisIntervals extends Object
| Modifier and Type | Method and Description |
|---|---|
static AxisIntervals |
computeIntervals(double value0,
double value1,
int primaryMinIntervalInPixels,
int secondaryMinIntervalInPixels,
int sizeInPixels)
Compute the intervals over a range of values.
|
double |
getCoordinateScale()
Get a multiplicative factor for scaling coordinates to pixels.
|
int |
getIntervalMagnitude()
Gets the integer power of ten corresponding to the
magnitude of the primary interval.
|
double[] |
getLabelCoordinates()
Gets the coordinates for labels.
|
String |
getLabelFormat()
Get a label format that is intended to be appropriate to
the magnitude of the primary interval
|
String[] |
getLabels()
Gets formatted labels for the tic coordinates.
|
double[][] |
getTicCoordinates()
Gets the coordinates for the tic marks to be added to the axis.
|
double |
getValue0()
Gets the minimum value of the range used to specify the axis.
|
double |
getValue1()
Gets the maximum value of the range used to specify the axis.
|
boolean |
isValue0Labeled()
Indicates if value0 was included in the primary tic coordinates.
|
boolean |
isValue1Labeled()
Indicates if value1 was included in the primary tic coordinates.
|
double |
mapValueToPixel(double value)
Maps a value to a corresponding pixel coordinate.
|
public double getValue0()
public double getValue1()
public boolean isValue0Labeled()
public boolean isValue1Labeled()
public double[][] getTicCoordinates()
public double[] getLabelCoordinates()
public String[] getLabels()
public String getLabelFormat()
public double getCoordinateScale()
public static AxisIntervals computeIntervals(double value0, double value1, int primaryMinIntervalInPixels, int secondaryMinIntervalInPixels, int sizeInPixels)
value0 - the minimum value to be represented.value1 - the maximum value to be represented.primaryMinIntervalInPixels - the minimum spacing allowed for the
primary intervalsecondaryMinIntervalInPixels - the minimum space allowed for the
secondary intervalsizeInPixels - the overall size of the area for labeling,
i..e$#46; the length of a horizontal axis or the height of
a vertical axispublic double mapValueToPixel(double value)
value - the value to be mapped.public int getIntervalMagnitude()
Copyright © 2019. All rights reserved.