org.autoplot.dom.Axis

The state of an axis, X, Y, or a Z axis colorbar, such as range and the scale type.

Axis( )


DEFAULT_RANGE


PROP_RANGE


PROP_SCALE


PROP_LOG


PROP_REFERENCE


PROP_LABEL

concise label for the axis.


PROP_FONTSIZE


PROP_DRAWTICKLABELS


PROP_OPPOSITE


PROP_VISIBLE

false indicates the component will not be drawn. Note the x and y axes are only drawn if the plot is drawn, and the colorbar may be drawn if the plot is not drawn.


PROP_AUTORANGE

true indicates the axis hasn't been changed and may/should be autoranged.


PROP_AUTORANGEHINTS


PROP_AUTOLABEL

true indicates the axis label hasn't been changed by a human and may/should be autoranged.


PROP_FLIPPED


PROP_TICKVALUES


PROP_AXISOFFSET

copy( ) → org.autoplot.dom.DomNode [view source]
diffs( org.autoplot.dom.DomNode node ) → java.util.List [view source]
getAutoRangeHints( ) → String [view source]
getAxisOffset( ) → String [view source]
getController( ) → org.autoplot.dom.AxisController [view source]
getFontSize( ) → String [view source]

getLabel

getLabel( ) → String

concise label for the axis.

Returns:

the label

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

getRange( ) → DatumRange [view source]
getReference( ) → String [view source]
getScale( ) → Datum [view source]
getTickValues( ) → String [view source]
isAutoLabel( ) → boolean [view source]
isAutoRange( ) → boolean [view source]
isDrawTickLabels( ) → boolean [view source]
isFlipped( ) → boolean [view source]
isLog( ) → boolean [view source]
isOpposite( ) → boolean [view source]
isVisible( ) → boolean [view source]
setAutoLabel( boolean autolabel ) → void [view source]
setAutoRange( boolean autorange ) → void [view source]
setAutoRangeHints( String autoRangeHints ) → void [view source]

setAxisOffset

setAxisOffset( String axisOffset ) → void

extra amount to scoot out the axis.

Parameters

axisOffset - a String

Returns:

void (returns nothing)

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

setDrawTickLabels( boolean drawTickLabels ) → void [view source]
setFlipped( boolean flipped ) → void [view source]

setFontSize

setFontSize( String fontSize ) → void

set the font size relative to the canvas font size. For example "2em" will be twice the size. "" is an alias for 1em.

Parameters

fontSize - a String

Returns:

void (returns nothing)

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


setLabel

setLabel( String label ) → void

concise label for the axis.

Parameters

label - the label

Returns:

void (returns nothing)

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


setLog

setLog( boolean log ) → void

set the log property. If the value makes the range invalid (log and zero), then the range is adjusted to make it valid. This works because the order of property setters doesn't matter.

Parameters

log - a boolean

Returns:

void (returns nothing)

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

setOpposite( boolean opposite ) → void [view source]

setRange

setRange( DatumRange range ) → void

set the range property. Right now, if the axis is log, and the range contains negative values, then the axis will be in an invalid state. We cannot change the range setting automatically because the next setting may be the log property, then the order of property setter calls would matter. TODO: consider mutatorLock... TODO: consider making the axis linear...

Parameters

range - a DatumRange

Returns:

void (returns nothing)

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


setReference

setReference( String reference ) → void

draw an optional reference line at the location. Valid entries can be parsed into a Datum, using the units of the axis.

Parameters

reference - a String

Returns:

void (returns nothing)

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

setScale( Datum scale ) → void [view source]

setTickValues

setTickValues( String ticks ) → void

manually set the tick positions or spacing. The following are examples of accepted settings:
empty string is legacy behavior
0,45,90,135,180explicit tick positions, in axis units
+45spacing between tickValues, parsed with the axis offset units.
+30s30 seconds spacing between tickValues

Parameters

ticks - a String

Returns:

void (returns nothing)

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

setVisible( boolean visible ) → void [view source]
syncTo( org.autoplot.dom.DomNode n ) → void [view source]
syncTo( org.autoplot.dom.DomNode n, java.util.List exclude ) → void [view source]