public class AxisLabels
extends java.lang.Object
| Constructor | Description |
|---|---|
AxisLabels(double[] ticks,
java.lang.String[] labels) |
Sets up a new AxisLabels.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getCount() |
Returns the number of ticks on the axis.
|
java.lang.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(java.lang.String[] args) |
|
java.lang.String |
toString() |
public AxisLabels(double[] ticks,
java.lang.String[] labels)
ticks - numeric values of the tickslabels - string values for each of the elements of
tickspublic int getCount()
public double getTick(int itick)
itick - index of the tickpublic java.lang.String getLabel(int itick)
getTick(itick), but some attempt
may be made to make the representation compact and tidy.itick - index of the tickpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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(java.lang.String[] args)
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.