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.


Variable Index

 o color
default color the data is plotted with
 o data
vector, where the DataSets are stored in
 o legend
name this instance is associated with.
 o xmax
maximal x-value in data
 o xmin
minimal x-value in data
 o ymax
maximal y-value in data
 o ymin
minimal y-value in data

Constructor Index

 o DataSeries(String, Color)
Describe constructor here.

Method Index

 o addDataSet(DataSet)
See {
 o addDataSet(double, double)
See {
 o addDataSet(double, double, Color)
 o getColor()
 o getData()
 o getLegend()
 o getXMax()
 o getXMin()
 o getYMax()
 o getYMin()
 o setColor(Color)
 o setLegend(String)

Variables

 o legend
 private String legend
name this instance is associated with. It is usually used as a legend.

 o data
 private Vector data
vector, where the DataSets are stored in

 o color
 private Color color
default color the data is plotted with

 o xmin
 private double xmin
minimal x-value in data

 o xmax
 private double xmax
maximal x-value in data

 o ymin
 private double ymin
minimal y-value in data

 o ymax
 private double ymax
maximal y-value in data

Constructors

 o 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

Methods

 o 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.

 o 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.

 o addDataSet
 public IDataSeries addDataSet(double x,
                               double y,
                               Color c)
 o setColor
 public final void setColor(Color c)
 o getColor
 public final Color getColor()
 o setLegend
 public final void setLegend(String name)
 o getLegend
 public final String getLegend()
 o getData
 public final Vector getData()
 o getXMin
 public final double getXMin()
 o getXMax
 public final double getXMax()
 o getYMin
 public final double getYMin()
 o getYMax
 public final double getYMax()

All Packages  Class Hierarchy  This Package  Previous  Next  Index