|
ElVis Java Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sv.graph.Fx
The Fx graph class contains all the elements of a graph. A graph contains 1 or more datasets, index label, plot area, axes, legend, and textual labels. The datasets are displayed simultaneously. Use the Fxt class for time indexed datasets. The Fxi class is for datasets indexed by a quantity other than time.
Field Summary | |
static int |
ALGEBRAIC
Axis Number is drawn as a single quantity |
static int |
AUTOMATIC
Axis Number style is computed based on data |
static int |
LINEAR
Values are linearly spaced |
static int |
LOGARITHMIC
Values are logarithmically spaced |
static int |
SCIENTIFIC
Axis Number is drawn with mantissa and exponent |
int |
shot
|
java.lang.String |
units
|
Constructor Summary | |
Fx(java.lang.String graphName)
Create a graph of datasets. |
Method Summary | |
void |
addDataset(Data1D data1D)
Add a dataset to the graph. |
void |
addLabel(java.lang.String text,
float x,
float y,
java.lang.String fontName,
java.lang.String fontStyle,
float height,
java.awt.Color color,
float rotation)
Add a label to the graph. |
void |
addLegendTitle(java.lang.String title)
Add a line of text to the legend. |
Data1D |
findClosestDataset(double[] xy)
|
java.util.List |
getLegendTitle()
Get the list of legend strings used in the title. |
GLabel |
getTitleLabel()
Get the title label. |
GLabel |
getXLabel()
Get the X axis label. |
int |
getXNumberStyle()
Get the numbering style of the X axis. |
float[] |
getXRange()
Get the X axis range. |
GLabel |
getYLabel()
Get the Y axis label. |
int |
getYNumberStyle()
Get the numbering style of the Y axis. |
float[] |
getYRange()
Get the Y axis range. |
boolean |
isLegend()
Return true if the legend will be shown |
boolean |
isShowLines()
Return true if lines between the markers will be shown |
boolean |
isShowMarkers()
Return true if the markers will be shown |
boolean |
isXGridlines()
Return true if the X axis gridlines should be drawn |
boolean |
isYGridlines()
Return true if the Y axis gridlines should be drawn |
void |
setLegendTitle(java.lang.String title)
Set the legend text. |
void |
setLocation(int r,
int c)
Set the grid location of the graph. |
void |
setPlotOrigin(float x,
float y)
Set the location of the plot area. |
void |
setPlotSize(float width,
float height)
Set the size of the plot area. |
void |
setScalable(boolean scaleX,
boolean scaleY)
Control scaling the axes. |
void |
setTitleLabel(GLabel label)
Set the title label. |
void |
setTitleLabel(java.lang.String text)
Set the title label. |
void |
setXLabel(GLabel label)
Set the X axis label. |
void |
setXLabel(java.lang.String text)
Set the X axis label. |
void |
setXNumberStyle(int style)
Set the numbering style of the X axis instead of having it computed based on the size of the data. |
void |
setXRange(float min,
float max)
Set the X axis range for the data. |
void |
setYLabel(GLabel label)
Set the Y axis label. |
void |
setYLabel(java.lang.String text)
Set the Y axis label. |
void |
setYLabel(java.lang.String text,
float rotation,
float x,
float y)
Set the Y axis label, rotation, and location. |
void |
setYNumberStyle(int style)
Set the numbering style of the Y axis instead of having it computed based on the size of the data. |
void |
setYRange(float min,
float max)
Set the Y axis range for the data. |
void |
showGridlines(boolean showX,
boolean showY)
Control drawing the grid lines. |
void |
showLegend(boolean show)
Control drawing the legend. |
void |
showLines(boolean show)
Control drawing of dataset lines. |
void |
showMarkers(boolean show)
Control drawing of markers at data points. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int shot
public java.lang.String units
public static final int ALGEBRAIC
public static final int SCIENTIFIC
public static final int AUTOMATIC
public static final int LINEAR
public static final int LOGARITHMIC
Constructor Detail |
public Fx(java.lang.String graphName)
graphName
- - The name of the graph. The name will be drawn as the title.Method Detail |
public void addDataset(Data1D data1D)
data1D
- - The dataset to add to the graph.public void addLabel(java.lang.String text, float x, float y, java.lang.String fontName, java.lang.String fontStyle, float height, java.awt.Color color, float rotation)
text
- - The text string to display.x
- - The x location of the lower left corner of the label.y
- - The y location of the lower left corner of the label.fontName
- - The name of the font for drawing the label.fontStyle
- - The style of the font for drawing the label.height
- - The height of the label, 0. - 1.color
- - The color for drawing the label.rotation
- - Horizontal or vertical.public void setLocation(int r, int c)
r
- - The row in the ScopePanel of this graph.c
- - The column in the ScopePanel of this graph.public void setPlotOrigin(float x, float y)
x
- - The x location of the lower left corner of the plot areay
- - The y location of the lower left corner of the plot areapublic void setPlotSize(float width, float height)
width
- - The width of the plot area.height
- - The height of the plot area.public void setXLabel(GLabel label)
label
- - The label to draw along the X axis.public void setYLabel(GLabel label)
label
- - The label to draw along the Y axis.public void setTitleLabel(GLabel label)
label
- - The label to draw as the title of the graph.public GLabel getTitleLabel()
public GLabel getXLabel()
public GLabel getYLabel()
public void setXLabel(java.lang.String text)
text
- - The text to draw along the X axis.public void setYLabel(java.lang.String text)
text
- - The text to draw along the Y axis.public void setYLabel(java.lang.String text, float rotation, float x, float y)
text
- - The text to draw along the Y axis.rotation
- - The rotation applied to the label.x
- - The x location of the origin of the label.y
- - The y location of the origin of the label.public float[] getXRange()
public float[] getYRange()
public void setXRange(float min, float max)
min
- - The start of the range.max
- - The end of the range.public void setYRange(float min, float max)
min
- - The start of the range.max
- - The end of the range.public int getXNumberStyle()
public int getYNumberStyle()
public void setXNumberStyle(int style)
style
- - The numbering style of the X axis.public void setYNumberStyle(int style)
style
- - The numbering style of the X axis.public void setTitleLabel(java.lang.String text)
text
- - The text to draw as the title of the graph.public void showLegend(boolean show)
show
- - true: draw the legend; false: hide the legend.public boolean isLegend()
public void addLegendTitle(java.lang.String title)
title
- - A line of text to draw in the legend.public void setLegendTitle(java.lang.String title)
title
- - A line of text to draw in the legend.public java.util.List getLegendTitle()
public void showGridlines(boolean showX, boolean showY)
showX
- - true: draw the grid lines at major ticks along the X axis; false: hide the grid lines along the X axis (default).showY
- - true: draw the grid lines at major ticks along the Y axis; false: hide the grid lines along the Y axis (default).public boolean isXGridlines()
public boolean isYGridlines()
public void setScalable(boolean scaleX, boolean scaleY)
scaleX
- - true: enable scaling the X axis (default); false: disable scaling the X axis.scaleY
- - true: enable scaling the Y axis (default); false: disable scaling the Y axis.public void showLines(boolean show)
show
- - true: draw the lines to connect the data points (default); false: hide the lines.public void showMarkers(boolean show)
show
- - true: draw a marker at each data point; false: hide the markers (default).public boolean isShowLines()
public boolean isShowMarkers()
public Data1D findClosestDataset(double[] xy)
|
ElVis Java Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |