[Swift-commit] r4648 - usertools/plotter/src/plotter

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Mon Jun 20 16:06:33 CDT 2011


Author: jonmon
Date: 2011-06-20 16:06:33 -0500 (Mon, 20 Jun 2011)
New Revision: 4648

Modified:
   usertools/plotter/src/plotter/Lines.java
   usertools/plotter/src/plotter/Plots.java
Log:
o moved collection method from Plots.java to Lines.java. Meant to move it to this file from a previous commit


Modified: usertools/plotter/src/plotter/Lines.java
===================================================================
--- usertools/plotter/src/plotter/Lines.java	2011-06-20 21:05:46 UTC (rev 4647)
+++ usertools/plotter/src/plotter/Lines.java	2011-06-20 21:06:33 UTC (rev 4648)
@@ -191,7 +191,41 @@
 
         return true;
     }
+    /**
+       Stores the label as the Series key.
+       Stores the filename as the Series description.
+    */
+    static XYSeriesCollection collection(List<double[][]> data,
+                                         List<String> labels,
+                                         List<String> names)
+    {
+        final XYSeriesCollection collection = new XYSeriesCollection();
 
+        int count = 0;
+        for (double[][] d : data)
+        {
+            String label = "data: " + count;
+            try
+            {
+                String s = labels.get(count);
+                if( !(s.equals("")) )
+                    label = s;
+            }
+            catch (IndexOutOfBoundsException e)
+            {}
+
+            Util.verbose( "label: "+label );
+            XYSeries series = new XYSeries(label);
+            for (int i = 0; i < d.length; i++)
+                series.add(d[i][0], d[i][1]);
+
+            series.setDescription(names.get(count));
+            collection.addSeries(series);
+            count++;
+        }
+        return collection;
+    }
+
     private static void setupPlot(JFreeChart chart,
                                   XYSeriesCollection collection)
     {

Modified: usertools/plotter/src/plotter/Plots.java
===================================================================
--- usertools/plotter/src/plotter/Plots.java	2011-06-20 21:05:46 UTC (rev 4647)
+++ usertools/plotter/src/plotter/Plots.java	2011-06-20 21:06:33 UTC (rev 4648)
@@ -1,6 +1,5 @@
 package plotter;
 
-import plotter.Util.*;
 import java.awt.Font;
 
 import java.util.Properties;
@@ -18,42 +17,6 @@
  */
 public class Plots
 {
-
-    /**
-       Stores the label as the Series key.
-       Stores the filename as the Series description.
-    */
-    static XYSeriesCollection collection(List<double[][]> data,
-                                         List<String> labels,
-                                         List<String> names)
-    {
-        final XYSeriesCollection collection = new XYSeriesCollection();
-
-        int count = 0;
-        for (double[][] d : data)
-        {
-            String label = "data: " + count;
-            try
-            {
-                String s = labels.get(count);
-                if( !(s.equals("")) )
-                    label = s;
-            }
-            catch (IndexOutOfBoundsException e)
-            {}
-
-            Util.verbose( "label: "+label );
-            XYSeries series = new XYSeries(label);
-            for (int i = 0; i < d.length; i++)
-                series.add(d[i][0], d[i][1]);
-
-            series.setDescription(names.get(count));
-            collection.addSeries(series);
-            count++;
-        }
-        return collection;
-    }
-
     static void setupLegend(JFreeChart chart,
                             Properties properties)
     {




More information about the Swift-commit mailing list