Package io.deephaven.plot
Class AxisImpl
java.lang.Object
io.deephaven.plot.AxisImpl
- All Implemented Interfaces:
Axis
,PlotExceptionCause
,Serializable
Represents an axis.
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOneClickChartModifier
(OneClickChartModifier oneClickChartModifier) void
void
Sets the color for this Axis line and tick marks.Sets the color for this Axis line and tick marks.axisFormat
(AxisFormat axisFormat) Sets theAxisFormat
for this Axis.axisFormatPattern
(String axisFormatPattern) Sets the format pattern for this Axis's labels.Sets the label for this Axis.axisLabelFont
(Font font) Sets the font for this Axis's label.axisLabelFont
(String family, String style, int size) Sets the font for this Axis's label.Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.businessTime
(boolean useBusinessTime) Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.businessTime
(SelectableDataSet sds, String calendar) Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.businessTime
(BusinessCalendar calendar) Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.chart()
Gets this AxisImpl's id.Creates a copy of this Axis using a different chart.int
dim()
Gets the dimensionality of this AxisImpl.Gets theAxisTransform
of this AxisImpl.getColor()
Gets this AxisImpl's color.Gets theAxisFormat
of this AxisImpl.Gets the format pattern for this AxisImpl's tick labels.double
Gets the gap between consecutive major ticks.boolean
Gets whether to invert this AxisImpl.getLabel()
Gets this AxisImpl's label.Gets theFont
of this AxisImpl's label.double[]
Gets the locations of the major ticks.double
Gets the maximum of this AxisImpl's range.int
Gets the number of minor ticks between consecutive major ticks.double
Gets the minimum of this AxisImpl's range.double
Gets the angle in degrees at which the tick label text will be drawn.Gets theFont
of this AxisImpl's tick labels.getType()
Gets the type of axis.int
id()
Gets this AxisImpl's id.invert()
Inverts this Axis so that larger values are closer to the origin.invert
(boolean invert) Inverts this Axis so that larger values are closer to the origin.boolean
isLog()
Whether this is a logarithmic axis.boolean
Whether the major ticks are drawn.boolean
Whether the minor ticks are drawn.boolean
Whether this axis is time axis.log()
Sets the AxisTransform as log base 10.log
(boolean useLog) Sets the AxisTransform as log base 10.max
(double max) Sets the maximum range of this Axis.max
(SelectableDataSet sds, String max) Sets the maximum range of this Axis.min
(double min) Sets the minimum range of this Axis.min
(SelectableDataSet sds, String min) Sets the minimum range of this Axis.minorTicks
(int nminor) Sets the number of minor ticks between consecutive major ticks.minorTicksVisible
(boolean visible) Sets whether minor ticks are drawn on this Axis.range
(double min, double max) Sets the range of this Axis to [min
,max
] inclusive.void
setTimeAxis
(boolean timeAxis) Sets the boolean representing whether this axis is time axistickLabelAngle
(double angle) Sets the angle the tick labels of this Axis are drawn at.ticks
(double gapBetweenTicks) Sets the tick locations.ticks
(double[] tickLocations) Sets the tick locations.Sets the font for this Axis's ticks.Sets the font for this Axis's ticks.ticksVisible
(boolean visible) Sets whether ticks are drawn on this Axis.transform
(AxisTransform transform) Sets theAxisTransform
for this Axis.
-
Field Details
-
oneClickChartModifiers
-
-
Constructor Details
-
AxisImpl
Creates a copy of an Axis using a different chart.- Parameters:
axis
- axis to copy.chart
- new chart.
-
-
Method Details
-
copy
Creates a copy of this Axis using a different chart.- Parameters:
chart
- new chart.- Returns:
- axis copy.
-
getPlotInfo
- Specified by:
getPlotInfo
in interfacePlotExceptionCause
-
dim
public int dim()Gets the dimensionality of this AxisImpl.- Returns:
- this AxisImpl's dimensionality
-
id
public int id()Gets this AxisImpl's id.- Returns:
- this AxisImpl's id
-
getColor
Gets this AxisImpl's color.- Returns:
- this AxisImpl's color
-
chart
Gets this AxisImpl's id.- Returns:
- this AxisImpl's id
-
getType
Gets the type of axis.- Returns:
- type of axis.
-
isLog
public boolean isLog()Whether this is a logarithmic axis.- Returns:
- if this is a logarithmic axis, true; false otherwise
-
getLabel
Gets this AxisImpl's label.- Returns:
- this AxisImpl's label
-
getLabelFont
Gets theFont
of this AxisImpl's label.- Returns:
- this AxisImpl's label's
Font
-
getTicksFont
Gets theFont
of this AxisImpl's tick labels.- Returns:
- this AxisImpl's tick label's
Font
-
getFormat
Gets theAxisFormat
of this AxisImpl.- Returns:
- this AxisImpl's
AxisFormat
-
getFormatPattern
Gets the format pattern for this AxisImpl's tick labels.- Returns:
- this AxisImpl's tick labels' format pattern
-
getInvert
public boolean getInvert()Gets whether to invert this AxisImpl.- Returns:
- whether to invert this AxisImpl.
-
getMinRange
public double getMinRange()Gets the minimum of this AxisImpl's range.- Returns:
- minimum of this AxisImpl's range
-
getMaxRange
public double getMaxRange()Gets the maximum of this AxisImpl's range.- Returns:
- maximum of this AxisImpl's range
-
isMinorTicksVisible
public boolean isMinorTicksVisible()Whether the minor ticks are drawn.- Returns:
- if the minor ticks will be drawn, true; otherwise false
-
isMajorTicksVisible
public boolean isMajorTicksVisible()Whether the major ticks are drawn.- Returns:
- if the major ticks will be drawn, true; otherwise false
-
getMinorTickCount
public int getMinorTickCount()Gets the number of minor ticks between consecutive major ticks.- Returns:
- number of minor ticks between consecutive major ticks
-
getGapBetweenMajorTicks
public double getGapBetweenMajorTicks()Gets the gap between consecutive major ticks.- Returns:
- the gap between consecutive major ticks
-
getMajorTickLocations
public double[] getMajorTickLocations()Gets the locations of the major ticks.- Returns:
- the locations of the major ticks
-
getTickLabelAngle
public double getTickLabelAngle()Gets the angle in degrees at which the tick label text will be drawn.- Returns:
- angle at which the tick label text will be drawn
-
getAxisTransform
Gets theAxisTransform
of this AxisImpl.- Returns:
- this AxisImpl's
AxisTransform
-
isTimeAxis
public boolean isTimeAxis()Whether this axis is time axis.- Returns:
- boolean informing whether this axis is time axis
-
setTimeAxis
public void setTimeAxis(boolean timeAxis) Sets the boolean representing whether this axis is time axis- Parameters:
timeAxis
- boolean representing whether this axis is time axis
-
addPartitionedTableHandle
-
getSwappableTables
-
getPartitionedTableHandles
-
addSwappableTable
-
addOneClickChartModifier
-
getOneClickChartModifiers
-
axisFormat
Description copied from interface:Axis
Sets theAxisFormat
for this Axis.- Specified by:
axisFormat
in interfaceAxis
- Parameters:
axisFormat
- axis format- Returns:
- this Axis
-
axisFormatPattern
Description copied from interface:Axis
Sets the format pattern for this Axis's labels.- Specified by:
axisFormatPattern
in interfaceAxis
- Parameters:
axisFormatPattern
- axis format pattern- Returns:
- this Axis
-
axisColor
Description copied from interface:Axis
Sets the color for this Axis line and tick marks. -
axisColor
Description copied from interface:Axis
Sets the color for this Axis line and tick marks. -
axisLabel
Description copied from interface:Axis
Sets the label for this Axis. -
axisLabelFont
Description copied from interface:Axis
Sets the font for this Axis's label.- Specified by:
axisLabelFont
in interfaceAxis
- Parameters:
font
- font- Returns:
- this Axis
-
axisLabelFont
Description copied from interface:Axis
Sets the font for this Axis's label.- Specified by:
axisLabelFont
in interfaceAxis
- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- this Axis
-
ticksFont
Description copied from interface:Axis
Sets the font for this Axis's ticks. -
ticksFont
Description copied from interface:Axis
Sets the font for this Axis's ticks.- Specified by:
ticksFont
in interfaceAxis
- Parameters:
family
- font family; if null, set to Arialstyle
- font style; if null, set toFont.FontStyle
PLAINsize
- the point size of the Font- Returns:
- this Axis
-
transform
Description copied from interface:Axis
Sets theAxisTransform
for this Axis. -
log
Description copied from interface:Axis
Sets the AxisTransform as log base 10. -
log
Description copied from interface:Axis
Sets the AxisTransform as log base 10. -
businessTime
Description copied from interface:Axis
Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.- Specified by:
businessTime
in interfaceAxis
- Parameters:
calendar
- business calendar of theAxisTransformBusinessCalendar
- Returns:
- this Axis using the specified business calendar.
-
businessTime
Description copied from interface:Axis
Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.- Specified by:
businessTime
in interfaceAxis
- Parameters:
sds
- selectable data set (e.g. OneClick filterable table) containing the business calendar.calendar
- name of a column containing String values, where each value is the name of aBusinessCalendar
.- Returns:
- this Axis using the business calendar from row 0 of the filtered
sds
for the business calendar. If no value is found, no transform will be applied.
-
businessTime
Description copied from interface:Axis
Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.- Specified by:
businessTime
in interfaceAxis
- Returns:
- this Axis using the default business calendar.
-
businessTime
Description copied from interface:Axis
Sets this Axis'sAxisTransform
as anAxisTransformBusinessCalendar
.- Specified by:
businessTime
in interfaceAxis
- Parameters:
useBusinessTime
- true to use a business time axis transform; false to use a linear axis transform.- Returns:
- this Axis using the default business calendar or this Axis using a linear axis transform.
-
invert
Description copied from interface:Axis
Inverts this Axis so that larger values are closer to the origin. -
invert
Description copied from interface:Axis
Inverts this Axis so that larger values are closer to the origin. -
range
Description copied from interface:Axis
Sets the range of this Axis to [min
,max
] inclusive. -
min
Description copied from interface:Axis
Sets the minimum range of this Axis. -
max
Description copied from interface:Axis
Sets the maximum range of this Axis. -
min
Description copied from interface:Axis
Sets the minimum range of this Axis. -
max
Description copied from interface:Axis
Sets the maximum range of this Axis. -
ticksVisible
Description copied from interface:Axis
Sets whether ticks are drawn on this Axis.- Specified by:
ticksVisible
in interfaceAxis
- Parameters:
visible
- whether ticks are drawn on this Axis- Returns:
- this Axis
-
ticks
Description copied from interface:Axis
Sets the tick locations. -
ticks
Description copied from interface:Axis
Sets the tick locations. -
minorTicksVisible
Description copied from interface:Axis
Sets whether minor ticks are drawn on this Axis.- Specified by:
minorTicksVisible
in interfaceAxis
- Parameters:
visible
- whether minor ticks are drawn on this Axis- Returns:
- this Axis
-
minorTicks
Description copied from interface:Axis
Sets the number of minor ticks between consecutive major ticks. These minor ticks are equally spaced.- Specified by:
minorTicks
in interfaceAxis
- Parameters:
nminor
- number of minor ticks between consecutive major ticks.- Returns:
- this Axis
-
tickLabelAngle
Description copied from interface:Axis
Sets the angle the tick labels of this Axis are drawn at.- Specified by:
tickLabelAngle
in interfaceAxis
- Parameters:
angle
- angle in degrees- Returns:
- this Axis
-