|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--edu.ull.cgunay.plots.Plot
|
+--edu.ull.cgunay.plots.SimplePlot
A simple single axis, single data plot. An t variable is
predefined in the dataset (data) corresponding to the
x-axis, so that body() method can return an expression
based on t. A preamble() method is provided for
any other definitions.
In general the plot is assumed to be a String composed of a preamble,
a plot command and some post commands or data.
The preamble() method represents the information required before the actual plot
command, and the body() method represents the part that will appear as the body of
the plot command. The range of the plot that will appear as part of the plot command is
kept as the range attribute.
As a simple example here is how to plot the y = t + 5 graph:
class MyPlot extends SimplePlot {
MyPlot(Range range) { super("My plot!", range); }
String body() {
return add("t","5");
}
}
Created: Wed Nov 6 22:37:04 2002
Modified: $Date: 2002/12/17 00:58:57 $
preamble(),
body(),
Serialized Form| Field Summary | |
(package private) Grapher.Axis |
axis
The single axis of this plot. |
(package private) Grapher.Data |
data
The single axis data of this plot |
| Fields inherited from class edu.ull.cgunay.plots.Plot |
axes, fontSize, grapher, label, range, title, xLabel, yLabel |
| Constructor Summary | |
SimplePlot(String label,
Range range)
|
|
| Method Summary | |
abstract String |
body()
Returns body that appears inside the plot command for the specific plot. |
String |
body(Grapher grapher)
Helper function to set grapher before calling body. |
String |
preamble()
Returns a preamble to appear before the plot command. |
String |
preamble(Grapher grapher)
Returns a preamble to appear before the plot command. |
void |
prepare(Grapher grapher)
Prepare the axis and data variables
with given grapher. |
String |
recipe(Grapher grapher)
A new way to describe plots in terms of Grapher
capabilities. |
| Methods inherited from class edu.ull.cgunay.plots.Plot |
add, assign, def_func, div, exp, func, geq, getFontSize, getGrapher, getLabel, getMaxRange, getMaxRange, getRange, getTitle, getXLabel, getYLabel, mul, neg, plot, profile, range, setFontSize, setGrapher, setLabel, setRange, setTitle, setXLabel, setYLabel, sub, toString, variable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
Grapher.Data data
Grapher.Axis axis
| Constructor Detail |
public SimplePlot(String label,
Range range)
| Method Detail |
public abstract String body()
String valuepublic String body(Grapher grapher)
grapher - a Grapher value
String valuepublic String preamble()
String valuepublic String preamble(Grapher grapher)
String valuepublic void prepare(Grapher grapher)
axis and data variables
with given grapher.
grapher - a Grapher value
String valuepublic String recipe(Grapher grapher)
Grapher
capabilities.
recipe in class Plotgrapher - a Grapher value
String value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||