/* SGT plotting from data file example by Andrew Ellis This example plots multiple data sets (two) */ import gov.noaa.pmel.sgt.cplab.*; import java.awt.*; public class xy_withoutarrays { public static void main(String[] args) { SimpleGraph sg = new SimpleGraph("X v. Y Demo", "x", "seconds", null, "y", "meters", null); DataSet ds = new DataSet(); for (int i = 0; i <= 100; i++) { ds.addPoint(i, i*i); } ds.setColor(Color.red); //add the DataSet to the SimpleGraph sg.addData(ds, "Key Title"); //make the graph visible sg.showGraph(); /* //show how to add a second graph double[] xy = new double[100]; for (float f = 0; f<100; f++) xy[(int)f] = f/40; sg.addData(xy, xy); */ }//end of main }//end of class