org.das2.graph.TickVDescriptor

A TickVDescriptor describes the position that ticks should be drawn, so that a fairly generic tick drawing routine can be used for multiple types of axes.

TickVDescriptor( double[] minorTicks, double[] ticks, Units units )

creates a TickVDescriptor with the given minor and major ticks.

TickVDescriptor( QDataSet ticks )

create the tickVDescriptor for a bunch of given ticks. The first two ticks are used to derive minor ticks, using the DomainDivider code.


bestTickLog20210921

bestTickLog20210921( Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin ) → org.das2.graph.TickVDescriptor

experimental code for calculating log ticks.

Parameters

minD - a Datum
maxD - a Datum
nTicksMin - an int
nTicksMax - an int
fin - a boolean

Returns:

an org.das2.graph.TickVDescriptor

[search for examples] [view on GitHub] [view on old javadoc] [view source]


bestTickVLinear

bestTickVLinear( Datum min, Datum max, int nTicksMin, int nTicksMax, boolean fin ) → org.das2.graph.TickVDescriptor

return a set of linear ticks, within the given constraints.

Parameters

min - the minimum
max - the maximum
nTicksMin - the minimum number of ticks.
nTicksMax - the maximum number of ticks.
fin - final, useful when debugging.

Returns:

an org.das2.graph.TickVDescriptor

[search for examples] [view on GitHub] [view on old javadoc] [view source]


bestTickVLogNew

bestTickVLogNew( Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin ) → org.das2.graph.TickVDescriptor

return a set of log ticks, within the given constraints.

Parameters

minD - the minimum
maxD - the maximum
nTicksMin - the minimum number of ticks.
nTicksMax - the maximum number of ticks.
fin - final, useful when debugging.

Returns:

the ticks.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


bestTickVTime

bestTickVTime( Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin ) → org.das2.graph.TickVDescriptor

Parameters

minD - a Datum
maxD - a Datum
nTicksMin - an int
nTicksMax - an int
fin - a boolean

Returns:

org.das2.graph.TickVDescriptor

[search for examples] [view on GitHub] [view on old javadoc] [view source]


bestTickVTimeOrdinal

bestTickVTimeOrdinal( Datum minD, Datum maxD, int nTicksMin, int nTicksMax, boolean fin ) → org.das2.graph.TickVDescriptor

return a set of ticks counting off ordinal time ranges, such as months, years, days, etc.

Parameters

minD - the minimum
maxD - the maximum
nTicksMin - the minimum number of ticks.
nTicksMax - the maximum number of ticks.
fin - final, useful when debugging.

Returns:

an org.das2.graph.TickVDescriptor

[search for examples] [view on GitHub] [view on old javadoc] [view source]


enclosingRange

enclosingRange( DatumRange dr, boolean minor ) → DatumRange

Defining method for getting the range close to the given range, but containing at least one minor(or major) tick interval.

Parameters

dr - a DatumRange
minor - find the range from the minor ticks.

Returns:

a DatumRange

See Also:

DomainDivider


[search for examples] [view on GitHub] [view on old javadoc] [view source]


findTick

findTick( Datum xDatum, double direction, boolean minor ) → Datum

Locates the next or previous tick starting at xDatum.

Parameters

xDatum - find the tick closest to this.
direction - -1 previous, 1 next, 0 closest
minor - find closest minor tick, major if false.

Returns:

the closest tick. If there is no tick in the given direction, then the behavior is undefined.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getFormatter

getFormatter( ) → org.das2.datum.format.DatumFormatter

Returns:

org.das2.datum.format.DatumFormatter

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getMajorTicks

getMajorTicks( ) → org.das2.datum.DatumVector

Returns:

org.das2.datum.DatumVector

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getMinorTicks

getMinorTicks( ) → org.das2.datum.DatumVector

Returns:

org.das2.datum.DatumVector

[search for examples] [view on GitHub] [view on old javadoc] [view source]


isDayOfYear

isDayOfYear( ) → boolean

Returns:

boolean

[search for examples] [view on GitHub] [view on old javadoc] [view source]


newTickVDescriptor

newTickVDescriptor( org.das2.datum.DatumVector majorTicks, org.das2.datum.DatumVector minorTicks ) → org.das2.graph.TickVDescriptor

Parameters

majorTicks - a DatumVector
minorTicks - a DatumVector

Returns:

org.das2.graph.TickVDescriptor

[search for examples] [view on GitHub] [view on old javadoc] [view source]

newTickVDescriptor( java.util.List majorTicks, java.util.List minorTicks ) → org.das2.graph.TickVDescriptor

setDayOfYear

setDayOfYear( boolean dayOfYear ) → void

Parameters

dayOfYear - a boolean

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setFormatter

setFormatter( org.das2.datum.format.DatumFormatter datumFormatter ) → void

Parameters

datumFormatter - a DatumFormatter

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


ticksEqual

ticksEqual( org.das2.graph.TickVDescriptor a, org.das2.graph.TickVDescriptor b ) → boolean

check that the two are element-for-element equal, looking only at the tick values.

Parameters

a - a TickVDescriptor
b - a TickVDescriptor

Returns:

true if they are equal

[search for examples] [view on GitHub] [view on old javadoc] [view source]


toString

toString( ) → String

Returns a String representation of the TickVDescriptor.

Returns:

a String representation of the TickVDescriptor.

[search for examples] [view on GitHub] [view on old javadoc] [view source]