All Packages Class Hierarchy This Package Previous Next Index
Class jsz.Plotter.DataSeries
java.lang.Object
|
+----java.util.Observable
|
+----jsz.Plotter.DataSeries
- public class DataSeries
- extends Observable
- implements IDataSeries
Straight-foreward implemenation of {@link
jsz.Plotter.IDataSeries}. This implementation supports
multicolored graphs. A dataseries is either plotted as
one-colored (default) or multi-colored line. A one-colored
graph turns into a multi-colored one when adding DataSets with
different colors (see {@link
jsz.Plotter.DataSet#setColor(Color c)} and {@link
jsz.Plotter.DataSet#DataSet(double x, double y, Color color)}
and {@link #addDataSet(double x, double y, Color
c)}). DataSets which doesn't define their own color are still
plotted with the default color, even if their added after a
colored DataSet. In other words, DataSets succeeding a colored
DataSet don't inherit that DataSet's color.
-
color
- default color the data is plotted with
-
data
- vector, where the DataSets are stored in
-
legend
- name this instance is associated with.
-
xmax
- maximal x-value in data
-
xmin
- minimal x-value in data
-
ymax
- maximal y-value in data
-
ymin
- minimal y-value in data
-
DataSeries(String, Color)
- Describe constructor here.
-
addDataSet(DataSet)
- See {
-
addDataSet(double, double)
- See {
-
addDataSet(double, double, Color)
-
-
getColor()
-
-
getData()
-
-
getLegend()
-
-
getXMax()
-
-
getXMin()
-
-
getYMax()
-
-
getYMin()
-
-
setColor(Color)
-
-
setLegend(String)
-
legend
private String legend
- name this instance is associated with. It is usually used as a legend.
data
private Vector data
- vector, where the DataSets are stored in
color
private Color color
- default color the data is plotted with
xmin
private double xmin
- minimal x-value in data
xmax
private double xmax
- maximal x-value in data
ymin
private double ymin
- minimal y-value in data
ymax
private double ymax
- maximal y-value in data
DataSeries
public DataSeries(String legend,
Color color)
- Describe constructor here.
- Parameters:
- legend - name associated with this dataseries (legend)
- color - default color the data is plotted with
addDataSet
public IDataSeries addDataSet(DataSet ds)
- See {@link jsz.Plotter.IDataSeries#addDataSet(DataSet ds)}.
Additionaly, if ds doesn't have a color associated, the default color
(see {@link #color}) is assigned to it.
addDataSet
public IDataSeries addDataSet(double x,
double y)
- See {@link jsz.Plotter.IDataSeries#addDataSet(double x,
double y)}. Additionaly, if ds doesn't have a color associated, the
default color (see {@link #color}) is assigned to it.
addDataSet
public IDataSeries addDataSet(double x,
double y,
Color c)
setColor
public final void setColor(Color c)
getColor
public final Color getColor()
setLegend
public final void setLegend(String name)
getLegend
public final String getLegend()
getData
public final Vector getData()
getXMin
public final double getXMin()
getXMax
public final double getXMax()
getYMin
public final double getYMin()
getYMax
public final double getYMax()
All Packages Class Hierarchy This Package Previous Next Index