All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lightgraph.DataSet Maven / Gradle / Ivy

The newest version!
package lightgraph;

import lightgraph.elements.ErrorBars;

import java.awt.Color;
import java.util.ArrayList;
import java.awt.geom.Point2D;
import java.util.Iterator;

/**
 * This class will hold a set of data it will keep track of color, line types, point types,
 * and weight.
 * 
 * User: mbs207
 * Date: May 20, 2010
 * Time: 6:41:24 AM
 */
public class DataSet implements Iterable{
    public Color COLOR;
    public GraphPoints POINTS;
    public GraphLine LINE;
    ArrayList DATA;
    public ErrorBars ERRORS;

    public String label;
    public DataSet(double[] x, double[] y){

        POINTS = GraphPoints.hollowCircles();
        LINE = GraphLine.solidLine();
        
        COLOR = Color.BLUE;

        DATA = new ArrayList();
        for(int i = 0; i iterator(){
        return DATA.iterator();
    }

    public void setData(double[] x, double[] y){
        DATA.clear();
        for(int i = 0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy