graphics.grapher
Class DataSet

java.lang.Object
  extended by graphics.grapher.DataSet

public class DataSet
extends java.lang.Object

Class DataSet Version 1.0 October 1995 Version 1.1 December 1995 Copyright (C) 1995, 1996 Leigh Brookshaw This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (affineTransform your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. This class is designed to be used in conjunction with the Graph2D class and Axis class for plotting 2D graphs.


Field Summary
 GraphComponent g2d
          Public Variables
static int LINE
           
 java.awt.Color linecolor
           
 int marker
           
 java.awt.Color markercolor
           
 double markerscale
           
static int NOLINE
          Public Static Values
 Axis xaxis
           
 double xmax
           
 double xmin
           
 Axis yaxis
           
 double ymax
           
 double ymin
           
 
Constructor Summary
DataSet()
          Constructors
DataSet(double[] d, int n)
           
 
Method Summary
 void append(double[] d, int n)
          Public Methods
 int dataPoints()
           
 void delete(int start, int end)
           
 void draw_data(java.awt.Graphics g, java.awt.Rectangle bounds)
           
 double[] getClosestPoint(double x, double y)
           
 int getLinestyle()
           
 double[] getPoint(int index)
           
 double getXmax()
           
 double getXmin()
           
 double getYmax()
           
 double getYmin()
           
 void legend(double x, double y, java.lang.String text)
           
 void legend(int x, int y, java.lang.String text)
           
 void legendColor(java.awt.Color c)
           
 void legendFont(java.awt.Font f)
           
 void setLinestyle(int linestyle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOLINE

public static final int NOLINE
Public Static Values

See Also:
Constant Field Values

LINE

public static final int LINE
See Also:
Constant Field Values

g2d

public GraphComponent g2d
Public Variables


linecolor

public java.awt.Color linecolor

marker

public int marker

markercolor

public java.awt.Color markercolor

markerscale

public double markerscale

xaxis

public Axis xaxis

yaxis

public Axis yaxis

xmax

public double xmax

xmin

public double xmin

ymax

public double ymax

ymin

public double ymin
Constructor Detail

DataSet

public DataSet()
Constructors


DataSet

public DataSet(double[] d,
               int n)
        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

append

public void append(double[] d,
                   int n)
            throws java.lang.Exception
Public Methods

Throws:
java.lang.Exception

delete

public void delete(int start,
                   int end)

draw_data

public void draw_data(java.awt.Graphics g,
                      java.awt.Rectangle bounds)

getXmax

public double getXmax()

getXmin

public double getXmin()

getYmax

public double getYmax()

getYmin

public double getYmin()

legend

public void legend(int x,
                   int y,
                   java.lang.String text)

legend

public void legend(double x,
                   double y,
                   java.lang.String text)

legendFont

public void legendFont(java.awt.Font f)

legendColor

public void legendColor(java.awt.Color c)

dataPoints

public int dataPoints()

getPoint

public double[] getPoint(int index)

getClosestPoint

public double[] getClosestPoint(double x,
                                double y)

getLinestyle

public int getLinestyle()

setLinestyle

public void setLinestyle(int linestyle)