smile.plot
Class Axis
- java.lang.Object
-
- smile.plot.Axis
-
public class Axis extends java.lang.ObjectThis class describes an axis of a coordinate system.
-
-
Constructor Summary
Constructors Constructor and Description Axis(Base base, int index)Constructor.Axis(Base base, int index, java.lang.String label)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AxisaddLabel(java.lang.String[] label, double[] location)Add a label to the axis at given location.AxisaddLabel(java.lang.String label, double location)Add a label to the axis at given location.java.lang.StringgetAxisLabel()Returns the label of the axis.intgetLinearSlices()Returns the number of slices in linear scale.booleanisFrameVisible()Returns the visibility of the frame grid lines and their labels.booleanisGridVisible()Returns the visibility of the grid lines and their labels.booleanisLabelVisible()Returns the visibility of the axis label.voidpaint(Graphics g)Draw the axis.AxisremoveLabel(java.lang.String label)Remove a label from the axis.AxissetAxisLabel(java.lang.String label)Sets the label of this axis.AxissetBase(Base base)Set the base coordinate space.AxissetFrameVisible(boolean v)Set the visibility of the frame grid lines and their labels.AxissetGridVisible(boolean v)Set the visibility of the grid lines and their labels.AxissetLabelVisible(boolean v)Set the visibility of the axis label.AxissetRotation(double rotation)Sets the rotation degree of grid label strings.
-
-
-
Constructor Detail
-
Axis
public Axis(Base base, int index)
Constructor.
-
Axis
public Axis(Base base, int index, java.lang.String label)
Constructor.
-
-
Method Detail
-
setRotation
public Axis setRotation(double rotation)
Sets the rotation degree of grid label strings.- Parameters:
rotation- rotation degree.
-
addLabel
public Axis addLabel(java.lang.String label, double location)
Add a label to the axis at given location.
-
addLabel
public Axis addLabel(java.lang.String[] label, double[] location)
Add a label to the axis at given location.
-
removeLabel
public Axis removeLabel(java.lang.String label)
Remove a label from the axis.
-
getLinearSlices
public int getLinearSlices()
Returns the number of slices in linear scale.
-
setGridVisible
public Axis setGridVisible(boolean v)
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
public Axis setFrameVisible(boolean v)
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.
-
setLabelVisible
public Axis setLabelVisible(boolean v)
Set the visibility of the axis label.
-
isLabelVisible
public boolean isLabelVisible()
Returns the visibility of the axis label.
-
setAxisLabel
public Axis setAxisLabel(java.lang.String label)
Sets the label of this axis.
-
getAxisLabel
public java.lang.String getAxisLabel()
Returns the label of the axis.
-
paint
public void paint(Graphics g)
Draw the axis.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG