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.
|
Tick[] |
getTicks(double masterDlo,
double masterDhi,
boolean withMinor,
Captioner captioner,
Orientation orient,
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 Tick[] getTicks(double masterDlo, double masterDhi, boolean withMinor, Captioner captioner, Orientation orient, int npix, double crowding)
Ticker
getTicks
in interface Ticker
masterDlo
- minimum axis data valuemasterDhi
- 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 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 © 2023 Central Laboratory of the Research Councils. All Rights Reserved.