|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.TickCalc
public abstract class TickCalc
Defines a rule for generating tick marks to label plot axes. Instances of this class do the work of determining positions and text labels for major ticks and positions of corresponding minor ticks given various provided constraints.
Nested Class Summary | |
---|---|
static class |
TickCalc.BasicTickCalc
Abstract TickCalc implementation that deals with fixed-length tick labels. |
Field Summary | |
---|---|
static TickCalc.BasicTickCalc |
LINEAR
TickCalc for linear axes. |
static TickCalc.BasicTickCalc |
LOG
TickCalc for logarithmic axes. |
Constructor Summary | |
---|---|
TickCalc()
|
Method Summary | |
---|---|
static Tick[] |
getMajorTicks(Ticker ticker,
double dlo,
double dhi)
Use a given ticker to generate major ticks in a given range of coordinates. |
static Tick[] |
getMinorTicks(Ticker ticker,
double dlo,
double dhi)
Use a given ticker to generate minor ticks in a given range of coordinates. |
abstract Tick[] |
getTicks(double dlo,
double dhi,
boolean withMinor,
Captioner captioner,
Orientation orient,
int npix,
double crowding)
Generates tick marks for labelling a plot axis. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final TickCalc.BasicTickCalc LINEAR
public static final TickCalc.BasicTickCalc LOG
Constructor Detail |
---|
public TickCalc()
Method Detail |
---|
public abstract Tick[] getTicks(double dlo, double dhi, boolean withMinor, Captioner captioner, Orientation orient, int npix, double crowding)
dlo
- minimum axis data valuedhi
- maximum axis data valuewithMinor
- if true minor axes are included,
if false only major (labelled) ones arecaptioner
- caption painterorient
- label orientationnpix
- number of pixels along the axiscrowding
- 1 for normal tick density on the axis,
lower for fewer labels, higher for more
public static Tick[] getMajorTicks(Ticker ticker, double dlo, double dhi)
ticker
- tick generatordlo
- minimum axis data valuedhi
- maximum axis data value
public static Tick[] getMinorTicks(Ticker ticker, double dlo, double dhi)
ticker
- tick generatordlo
- minimum axis data valuedhi
- maximum axis data value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |