|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--edu.ull.cgunay.plots.Grapher
|
+--edu.ull.cgunay.plots.MatLab
Grapher implementation for plotting with the
MatLab program.
See description in Grapher for the usage.
Created: Fri Apr 12 22:18:46 2002
Modified: $Date: 2003/03/21 05:10:57 $
Grapher| Nested Class Summary | |
(package private) class |
MatLab.Axis
Overriding original Axis definition. |
(package private) class |
MatLab.DefaultDataType
Simple plot command type. |
(package private) class |
MatLab.ErrorDataType
|
(package private) class |
MatLab.ImpulseDataType
|
(package private) class |
MatLab.MatLabDataType
|
(package private) class |
MatLab.MultiAxes
|
(package private) class |
MatLab.PatternIterator
If multiple datasets are plotted on same axis, cycle through these (only required for stupid Matlab). |
| Nested classes inherited from class edu.ull.cgunay.plots.Grapher |
Grapher.Data, Grapher.ErrorData, Grapher.PreciseProfileData, Grapher.ProfileData, Grapher.VerticalBar |
| Field Summary | |
(package private) MatLab.PatternIterator |
patterns
|
| Fields inherited from class edu.ull.cgunay.plots.Grapher |
dataTypes, err, msg, out, points, process, windowNumber |
| Constructor Summary | |
MatLab()
Spawns matlab interpreter and defines datatypes. |
|
| Method Summary | |
String |
assign(String var,
String value)
Add a proper MatLab termination to the superior definition. |
void |
close()
Exits matlab process. |
String |
command(String line)
Add end-of-line separator for matlab. |
Grapher.Axis |
createAxis()
Convenience method to get instance of Axis defined
here. |
Grapher.MultiAxes |
createMultiAxes(Grapher.Axis[] axes)
Convenience method to get instance of MultiAxes defined
here. |
Grapher.MultiAxes |
createMultiAxes(List axes)
Convenience method to get instance of MultiAxes defined
here. |
String |
def_func(String name,
String[] params,
String body)
Creates a file in the current directory named with the function for matlab. |
(package private) String |
labelString(Grapher.Data plot)
Returns a proper dataset label statement in MatLab if label available. |
String |
mul(String a,
String b)
Returns a String that is a scalar product for MatLab which
is "(a) .* (b)". |
PlotHandle |
multiPlot(Collection plots,
PrintStream out)
Initial implementation of a collection of separate plots appear on one figure aligend vertically with matching ranges. |
String |
plotToString(SimplePlot plot)
Deprecated. |
String |
plotToString(SpikePlot plot)
Returns a String representation of a spike
plot for the Grapher. |
String |
plotToStringAlt(Plot plot)
Alternative to plotToString, supposed to replace it
soon.
|
String |
quote(String value)
Matlab style 'quoting'. |
String |
range(Range range)
Returns range in the matlab format "a:(b-a)/points:b" |
void |
setWindow(int windowNumber)
Opens new matlab figure. |
PlotHandle |
superposedPlot(String title,
Collection plots,
PrintStream out)
Initial implementation of a superposed collection of plots appearing on one figure. |
(package private) String |
titleString(HasAxisLabels plot)
Returns a proper title statement in MatLab if available. |
void |
writeEPS(PlotHandle handle,
String filename)
Exports an EPS file of the previously visualized (required) plot. |
void |
writeEPSbw(PlotHandle handle,
String filename)
Exports a black-n-white EPS file of the previously visualized (required) plot. |
(package private) String |
xLabelString(HasAxisLabels plot)
Returns a proper statement in MatLab to set the x-axis label if available. |
(package private) String |
yLabelString(HasAxisLabels plot)
Returns a proper statement in MatLab to set the y-axis label if available. |
| Methods inherited from class edu.ull.cgunay.plots.Grapher |
add, display, div, exp, func, geq, getPoints, multiPlot, neg, paren, profile, response, setPoints, sub, superposedPlot, variable, waitForResponse |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
MatLab.PatternIterator patterns
| Constructor Detail |
public MatLab()
throws GrapherNotAvailableException
TODO: the datatypes should anonymously be defined in this constructor for simplicity rather than being defined as one-time use inner classes. Doesn't make sense.
GrapherNotAvailableException - if an error occursGrapher.DataType| Method Detail |
public String plotToString(SpikePlot plot)
GrapherString representation of a spike
plot for the Grapher.
plotToString in class Grapherplot - a SpikePlot value
String valueplotToStringAlt(Plot)public String plotToString(SimplePlot plot)
plotToString in class Grapherplot - a Plot value
String valueplotToStringAlt(edu.ull.cgunay.plots.Plot),
SimplePlot.body()public Grapher.Axis createAxis()
Axis defined
here.
createAxis in class GrapherAxis subclass instance for the given grapher.public Grapher.MultiAxes createMultiAxes(Grapher.Axis[] axes)
MultiAxes defined
here.
createMultiAxes in class Grapheraxes - a Grapher.Axis[] value
Grapher.MultiAxes valuepublic Grapher.MultiAxes createMultiAxes(List axes)
MultiAxes defined
here.
createMultiAxes in class Grapheraxes - a List of Grapher.Axis[] values
Grapher.MultiAxes valuepublic String plotToStringAlt(Plot plot)
plotToString, supposed to replace it
soon.
TODO: Should it stay in Grapher?
plotToStringAlt in class Grapherplot - a Plot value
String valueString labelString(Grapher.Data plot)
plot - a Plot value
String titleString(HasAxisLabels plot)
plot - a Plot value
String xLabelString(HasAxisLabels plot)
plot - a Plot value
String valueString yLabelString(HasAxisLabels plot)
plot - a Plot value
String value
public PlotHandle multiPlot(Collection plots,
PrintStream out)
multiPlot in class Grapherplots - a Collection valueout - a PrintStream value
String valueGNUPlot.multiPlot(java.util.Collection, java.io.PrintStream),
multiPlot(java.util.Collection, java.io.PrintStream)
public PlotHandle superposedPlot(String title,
Collection plots,
PrintStream out)
Note: SpikePlots currently not allowed.
TODO: return a Plot from this.
superposedPlot in class Grapherplots - a Collection valuetitle - a String valueout - a PrintStream value
String value
public String mul(String a,
String b)
String that is a scalar product for MatLab which
is "(a) .* (b)".
mul in class Graphera - a String valueb - a String value
String value
public String def_func(String name,
String[] params,
String body)
def_func in class Graphername - a String value, name of the functionparams - a String[] value, parameter names of the functionbody - a String value, the body of the function
String value
public String assign(String var,
String value)
assign in class Graphervar - a String valuevalue - a String value
String valuepublic String range(Range range)
range in class Grapherrange - a Range value
String valuepublic void close()
close in class Grapherpublic String quote(String value)
quote in class Graphervalue - a String valuepublic String command(String line)
command in class Grapherline - a String valuepublic void setWindow(int windowNumber)
setWindow in class GrapherwindowNumber - an int value
public void writeEPS(PlotHandle handle,
String filename)
Grapher
writeEPS in class Grapherhandle - a PlotHandle valuefilename - a String value
public void writeEPSbw(PlotHandle handle,
String filename)
GrapherTODO: make some export properties to handle these.
writeEPSbw in class Grapherhandle - a PlotHandle valuefilename - a String value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||