lightgraph.DataSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of light-weight-graphing Show documentation
Show all versions of light-weight-graphing Show documentation
Library for creating graphs in a swing environment. Can produce png or svg.
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