|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph.Graph
org.faceless.graph.AxesGraph
org.faceless.graph.AbstractLineGraph
public abstract class AbstractLineGraph
The abstract superclass for all graphs plotting
continuous data (as opposed to bar graphs, which are
for plotting discrete data). Unlike Pie Graphs and Bar Graphs,
Line Graphs plot a Curve
,
which covers everything from a set of X and Y values (a
DataCurve
) to complex mathematical
functions.
Several curves can be plotted on the same graph, for example to compare a set of readings with a theoretical curve.
Field Summary |
---|
Fields inherited from class org.faceless.graph.Graph |
---|
KEY_BOXED_BOTTOM, KEY_BOXED_LEFT, KEY_BOXED_RIGHT, KEY_BOXED_TOP, KEY_NONE |
Method Summary | |
---|---|
void |
optionCurveDepth(double val)
The depth "into the screen" of a curve. |
void |
optionFunctionSmoothness(double val)
If you're plotting a FunctionCurve ,
how many steps to divide the curve into. |
void |
optionMaxDataPoints(int val)
If you're plotting a DataCurve ,
the maximum number of values to plot. |
void |
optionMaxX(double val)
The maximum value to plot on the X axis. |
void |
optionMinX(double val)
The minimum value to plot on the X axis. |
void |
setCurve(String name,
Curve curve)
Add a Curve to the graph in the next default color. |
void |
setCurve(String name,
Curve curve,
Color color)
Add a Curve to the graph in the specified color. |
Methods inherited from class org.faceless.graph.Graph |
---|
getDefaultBorderColor, getFontScale, optionDisplayKey, optionFixedAspectRatio, optionKeyBoxStyle, optionKeyStyle, optionSubTitle, optionSubTitleStyle, optionTitle, optionTitleStyle, optionXRotation, optionYRotation, optionZRotation, setDefaultBorderColor, setDefaultColors, setDefaultLineThickness, setFontScale, setLicenseKey, setLightLevel, setLightVector, setPieEdgeDegrees, toCanvas |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setCurve(String name, Curve curve, Color color)
Curve
to the graph in the specified color.
If a curve with this name already exists it will be replaced.
name
- the name to give this curvecurve
- the curve to addcolor
- the color to plot this curve inpublic void setCurve(String name, Curve curve)
Curve
to the graph in the next default color.
If a curve with this name already exists it will be replaced.
name
- the name to give this curvecurve
- the curve to addpublic void optionMinX(double val)
DataCurve
,
the actual minimum will be the lesser of this value and the lowest value
in the curve. For graphs plotting only one or more
FunctionCurve
, this value is mandatory.
Default: data-driven
public void optionMaxX(double val)
Default: data-driven
public void optionFunctionSmoothness(double val)
FunctionCurve
,
how many steps to divide the curve into. Higher numbers give
smoother curves, but slower rendering times.
Default: 30
public void optionMaxDataPoints(int val)
DataCurve
,
the maximum number of values to plot. If your data set has thousands
of values, you may set this and drop a few to speed things up (exactly
which points are dropped are undefined, but the remaning data is
guaranteed to be evenly spread across the graph).
Default: 100
public void optionCurveDepth(double val)
Default: 1
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |