public class SlaveTicker extends Object implements Ticker
| Constructor and Description |
|---|
SlaveTicker(Axis masterAxis,
java.util.function.DoubleUnaryOperator masterToSlaveFunc,
Ticker basicTicker)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static SlaveTicker |
createTicker(Axis masterAxis,
java.util.function.DoubleUnaryOperator masterToSlaveFunc)
Creates a SlaveTicker instance with automatic selection of basic ticker.
|
TickRun |
getTicks(double masterDlo,
double masterDhi,
boolean withMinor,
Captioner captioner,
Orientation[] orients,
int npix,
double crowding)
Generates tick marks for labelling a plot axis.
|
double |
masterToSlave(double masterValue)
Maps a value on the master axis to a value on the slave axis.
|
double |
slaveToMaster(double slaveValue)
Maps a value on the slave axis to a value on the master axis.
|
public SlaveTicker(Axis masterAxis, java.util.function.DoubleUnaryOperator masterToSlaveFunc, Ticker basicTicker)
masterAxis - master axismasterToSlaveFunc - function mapping values on the master axis
to values on the slave axisbasicTicker - ticker than can provide labels on a given rangepublic TickRun getTicks(double masterDlo, double masterDhi, boolean withMinor, Captioner captioner, Orientation[] orients, int npix, double crowding)
TickerThe supplied list of orientations is attempted in order; if the required crowding can be satisfied by any of them, that orientation will be used. If it can't be supplied by any (because of unavoidable label overlap) a lower crowding value may be used.
getTicks in interface TickermasterDlo - minimum axis data valuemasterDhi - maximum axis data valuewithMinor - if true minor axes are included,
if false only major (labelled) ones arecaptioner - caption painterorients - array of label orientations in order of preference,
must contain at least one elementnpix - number of pixels along the axiscrowding - 1 for normal tick density on the axis,
lower for fewer labels, higher for morepublic double masterToSlave(double masterValue)
masterValue - master axis valuepublic double slaveToMaster(double slaveValue)
slaveValue - slave axis valuepublic static SlaveTicker createTicker(Axis masterAxis, java.util.function.DoubleUnaryOperator masterToSlaveFunc)
masterAxis - master axismasterToSlaveFunc - function mapping values on the master axis
to values on the slave axisCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.