public class AxisLabels extends Object
Constructor and Description |
---|
AxisLabels(double[] ticks,
String[] labels)
Sets up a new AxisLabels.
|
Modifier and Type | Method and Description |
---|---|
int |
getCount()
Returns the number of ticks on the axis.
|
String |
getLabel(int itick)
Returns the label for one of the tick marks.
|
double |
getTick(int itick)
Returns the axis position of one of the tick marks.
|
static AxisLabels |
labelLinearAxis(double lo,
double hi,
int approxTicks)
Sets up axis labels for a linearly scaled axis.
|
static AxisLabels |
labelLogAxis(double lo,
double hi,
int approxTicks)
Sets up axis labels for a logarithmically scaled axis.
|
static void |
main(String[] args) |
String |
toString() |
public AxisLabels(double[] ticks, String[] labels)
ticks
- numeric values of the tickslabels
- string values for each of the elements of
ticks
public int getCount()
public double getTick(int itick)
itick
- index of the tickpublic String getLabel(int itick)
getTick(itick)
, but some attempt
may be made to make the representation compact and tidy.itick
- index of the tickpublic static AxisLabels labelLinearAxis(double lo, double hi, int approxTicks)
lo
- lower bound of the axishi
- upper bound of the axisapproxTicks
- the approximate number of ticks you'd like to seepublic static AxisLabels labelLogAxis(double lo, double hi, int approxTicks)
lo
- lower bound of axishi
- upper bound of axisapproxTicks
- the approximate number of ticks you'd like to seepublic static void main(String[] args)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.