Package smile.plot.swing
Class Axis
java.lang.Object
smile.plot.swing.Axis
This class describes an axis of a coordinate system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
Returns the label of the axis.boolean
Returns the visibility of the frame grid lines and their labels.boolean
Returns the visibility of the grid lines and their labels.boolean
Returns the visibility of the axis label.void
Draw the axis.void
reset()
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.void
Sets the label.setRotation
(double rotation) Sets the rotation degree of tick strings.void
Add a label to the axis at given location.setTickVisible
(boolean v) Set the visibility of the axis label.int
slices()
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.
-