|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.charts.Axis
public class Axis
Represents an axis of a chart encapsulated by
an instance of XYChart.
Axis uses the JFreeChart class NumberAxis
to store some axis properties.
This class represents the x-axis or the y-axis of a XYChart
and, consequently, is drawn when calling the toLatex
method.
It provides tools to customize the axis in modifying labels and description.
Field Summary | |
---|---|
static boolean |
ORIENTATION_HORIZONTAL
|
static boolean |
ORIENTATION_VERTICAL
|
Constructor Summary | |
---|---|
Axis(NumberAxis inAxis,
boolean orientation)
Create a new Axis instance from an existing NumberAxis instance with vertical (y-axis) or horizontal (x-axis) orientation. |
Method Summary | |
---|---|
void |
disableCustomLabels()
Deprecated. |
void |
enableCustomLabels()
Deprecated. |
String |
getLabel()
Returns the axis description. |
double |
getTwinAxisPosition()
Returns the drawing position parameter (default equals 0). |
void |
setLabel(String label)
Sets the axis description. |
void |
setLabels(double tick)
Sets a periodic label display. |
void |
setLabels(double[] position)
Sets the position of each label on this axis. |
void |
setLabels(double[] position,
String[] label)
Assigns custom labels to user-defined positions on the axis. |
void |
setLabelsAuto()
Calculates and sets an automatic tick unit. |
void |
setTwinAxisPosition(double position)
Defines where the opposite axis must be drawn on the current axis, where it should appear, and on which label. |
String |
toLatex(double scale)
Formats and returns a string containing a LATEX-compatible source code which represents this axis and its parameters. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean ORIENTATION_VERTICAL
public static final boolean ORIENTATION_HORIZONTAL
Constructor Detail |
---|
public Axis(NumberAxis inAxis, boolean orientation)
inAxis
- NumberAxis instance associated to the new variable.orientation
- axis direction, horizontal or verticalMethod Detail |
---|
public String getLabel()
public void setLabel(String label)
label
- axis label.public void setLabels(double tick)
tick
- tick unit.public void setLabelsAuto()
@Deprecated public void enableCustomLabels()
@Deprecated public void disableCustomLabels()
public void setLabels(double[] position)
position
- new label positions.public void setLabels(double[] position, String[] label)
position
- label series position on the axis.label
- label series name on the axis.public double getTwinAxisPosition()
public void setTwinAxisPosition(double position)
position
- new drawing position.public String toLatex(double scale)
scale
- current axis wished scale.
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |