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

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Tue Apr 12 15:14:26 CDT 2011


Author: wozniak
Date: 2011-04-12 15:14:26 -0500 (Tue, 12 Apr 2011)
New Revision: 4347

Modified:
   usertools/plotter/src/plotter/Lines.java
Log:
Enable user to turn legend off


Modified: usertools/plotter/src/plotter/Lines.java
===================================================================
--- usertools/plotter/src/plotter/Lines.java	2011-04-12 19:37:04 UTC (rev 4346)
+++ usertools/plotter/src/plotter/Lines.java	2011-04-12 20:14:26 UTC (rev 4347)
@@ -37,6 +37,8 @@
   static Double ymin = null;
   static Double ymax = null;
 
+  static boolean withLegend = true;
+
   /**
      Generate simple plot.
      @param collection The x,y data.
@@ -74,8 +76,6 @@
       return false;
     }
 
-    final boolean withLegend = true;
-
     JFreeChart chart =
       ChartFactory.createXYLineChart
       (title, xlabel, ylabel, collection,
@@ -265,6 +265,7 @@
      height (output image height)
      xmin, xmax, ymin, ymax (auto-selected if not given)
      bw (Black and white, true/false, default false)
+     legend.enabled (true/false, default true)
   */
   static void scanProperties()
   {
@@ -290,6 +291,9 @@
     tmp = properties.getProperty("bw");
     if (tmp != null)
       bw = Boolean.parseBoolean(tmp);
+    tmp = properties.getProperty("legend.enabled");
+    if (tmp != null)
+      withLegend = Boolean.parseBoolean(tmp);
   }
 
   /**




More information about the Swift-commit mailing list