Package smile.plot.swing
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 axis label.voidDraw the axis.voidreset()Set the base coordinate space.setFrameVisible(boolean v) Set the visibility of the frame grid lines and their labels.setGridVisible(boolean v) Set the visibility of the grid lines and their labels.voidSets the label.setRotation(double rotation) Sets the rotation degree of tick strings.voidAdd a label to the axis at given location.setTickVisible(boolean v) Set the visibility of the axis label.intslices()Returns the number of slices in linear scale.
-
Constructor Details
-
Axis
Constructor.
-
-
Method Details
-
reset
public void reset()Set the base coordinate space. -
setRotation
Sets the rotation degree of tick strings.- Parameters:
rotation- rotation degree.
-
setTicks
Add a label to the axis at given location. -
slices
public int slices()Returns the number of slices in linear scale. -
setGridVisible
Set the visibility of the grid lines and their labels. -
isGridVisible
public boolean isGridVisible()Returns the visibility of the grid lines and their labels. -
setFrameVisible
Set the visibility of the frame grid lines and their labels. -
isFrameVisible
public boolean isFrameVisible()Returns the visibility of the frame grid lines and their labels. -
setTickVisible
Set the visibility of the axis label. -
isTickVisible
public boolean isTickVisible()Returns the visibility of the axis label. -
setLabel
Sets the label. -
getLabel
Returns the label of the axis. -
paint
Draw the axis.
-