Class Axis
java.lang.Object
smile.plot.swing.Axis
This class describes an axis of a coordinate system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Returns the label of the axis.booleanReturns the visibility of the frame grid lines and their labels.booleanReturns the visibility of the grid lines and their labels.booleanReturns the visibility of the tick labels.voidDraws the axis.voidreset()Resets the base coordinate space.setFrameVisible(boolean visible) Set the visibility of the frame grid lines and their labels.setGridVisible(boolean visible) Sets the visibility of the grid lines and their labels.voidSets the label.setRotation(double rotation) Sets the rotation degree of tick strings.Adds a label to the axis at given location.setTickVisible(boolean visible) Sets the visibility of the tick labels.intslices()Returns the number of slices in linear scale.
-
Constructor Details
-
Axis
Constructor.- Parameters:
base- The base coordinate space.index- The index of coordinate associated with this axis.
-
-
Method Details
-
reset
public void reset()Resets the base coordinate space. -
setRotation
Sets the rotation degree of tick strings.- Parameters:
rotation- rotation degree.- Returns:
- this object.
-
setTicks
-
slices
public int slices()Returns the number of slices in linear scale.- Returns:
- the number of slices in linear scale.
-
setGridVisible
Sets the visibility of the grid lines and their labels.- Parameters:
visible- the flag if the grid is visible.- Returns:
- this object.
-
isGridVisible
public boolean isGridVisible()Returns the visibility of the grid lines and their labels.- Returns:
- true if the grid is visible.
-
setFrameVisible
Set the visibility of the frame grid lines and their labels.- Parameters:
visible- the flag if the frame is visible.- Returns:
- this object.
-
isFrameVisible
public boolean isFrameVisible()Returns the visibility of the frame grid lines and their labels.- Returns:
- true if the frame is visible.
-
setTickVisible
Sets the visibility of the tick labels.- Parameters:
visible- the flag if the ticks are visible.- Returns:
- this object.
-
isTickVisible
public boolean isTickVisible()Returns the visibility of the tick labels.- Returns:
- true if the ticks are visible.
-
setLabel
-
getLabel
-
paint
-