|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.gnuplot.Gnuplot
A class for creating evaluation plots with gnuplot, a common Unix/Linux plotting tool with a textual interface. Thus, this class might work only on Unix/Linux; anyway, it is not tested under Windows.
This class allows for
null),null),mind.evaluation.gnuplot.Source or one of its subclasses).mind.evaluation.gnuplot.Source describes a single plot curve
which might be a function, a discrete (empirical) distribution or anything
else.
The path to gnuplot is taken from the property gnuplot.bin.
| Field Summary | |
protected boolean |
bw
Flag indicating if this is a b/w plot. |
protected boolean |
fig
Flag indicating if this is a xfig plot. |
protected double |
maxx
The maximum value for the x-axis (default is 0). |
protected double |
maxy
The maximum value for the y-axis (default is 0). |
protected double |
minx
The minimum value for the x-axis (default is 0). |
protected double |
miny
The minimum value for the y-axis (default is 0). |
protected java.lang.String |
outputfile
The name (absolute or relative) of the output EPS file, without extension .eps. |
protected java.util.List |
sources
The registered sources. |
protected java.lang.String |
title
The title of the plot. |
protected java.lang.String |
xlabel
The label for the x-axis of the plot. |
protected java.lang.String |
ylabel
The label for the y-axis of the plot. |
| Constructor Summary | |
Gnuplot()
|
|
| Method Summary | |
java.lang.StringBuffer |
addLaTeX(java.lang.StringBuffer latex)
Adds LaTeX commands for including the result plot. |
void |
addSource(Source source)
Adds a source to the plot. |
java.lang.String |
getGnuplotString()
Returns the gnuplot commands. |
java.lang.String |
getLaTeX()
Returns LaTeX commands for including the result plot. |
void |
run()
Runs gnuplot and creates an .pdf file. |
void |
setBW()
Sets the b/w mode. |
void |
setColor()
Sets the color mode. |
void |
setFIG()
Sets the fig output mode. |
void |
setLabels(java.lang.String xlabel,
java.lang.String ylabel)
Sets the labels for the x-axis and the y-axis of the plot. |
void |
setMinMaxX(double minx,
double maxx)
Sets the minimum and the maximum values for the x-axis. |
void |
setMinMaxY(double miny,
double maxy)
Sets the minimum and the maximum values for the y-axis. |
void |
setOutputfile(java.io.File outputfile)
Sets the name (absolute or relative) of the output EPS file, without extension .eps. |
void |
setOutputfile(java.lang.String outputfile)
Sets the name (absolute or relative) of the output EPS file, without extension .eps. |
void |
setPDF()
Sets the pdf output mode. |
void |
setTitle(java.lang.String title)
Sets the title of the plot. |
void |
write(java.lang.String file)
Writes the gnuplot commands into a file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String outputfile
protected java.lang.String title
null (default),
no title is used.
protected java.lang.String xlabel
null (default), no label is used.
protected java.lang.String ylabel
null (default), no label is used.
protected double maxx
0).
protected double maxy
0).
protected double minx
0).
protected double miny
0).
protected java.util.List sources
protected boolean bw
protected boolean fig
| Constructor Detail |
public Gnuplot()
| Method Detail |
public void setOutputfile(java.lang.String outputfile)
outputfile - name of the output filepublic void setOutputfile(java.io.File outputfile)
outputfile - name of the output filepublic void setBW()
public void setColor()
public void setFIG()
public void setPDF()
public void setTitle(java.lang.String title)
setTitle(null). By default, no title is used.
title - title of the plot, or null
public void setLabels(java.lang.String xlabel,
java.lang.String ylabel)
setLabels(null,null). By default, no
labels used.
xlabel - label for the x-axis, or nullylabel - label for the y-axis, or null
public void setMinMaxX(double minx,
double maxx)
0. labels used.
minx - minimum value for the x-axismaxx - maximum value for the x-axis
public void setMinMaxY(double miny,
double maxy)
0. labels used.
miny - minimum value for the y-axismaxy - maximum value for the y-axispublic void addSource(Source source)
If the minimum and the maximum values for the x-axis of the given source differ, they are taken into account for the minimum and the maximum values for the x-axis of this plot.
source - plot curve source to be addedpublic void write(java.lang.String file)
file - name of the file in which the plot commands are written intopublic java.lang.String getGnuplotString()
public void run()
public java.lang.String getLaTeX()
public java.lang.StringBuffer addLaTeX(java.lang.StringBuffer latex)
latex - string buffer for LaTeX commands
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||