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

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Mon Apr 30 11:58:45 CDT 2012


Author: wozniak
Date: 2012-04-30 11:58:45 -0500 (Mon, 30 Apr 2012)
New Revision: 5778

Modified:
   usertools/plotter/src/plotter/Dual.java
Log:
Bug fixes


Modified: usertools/plotter/src/plotter/Dual.java
===================================================================
--- usertools/plotter/src/plotter/Dual.java	2012-04-30 16:41:55 UTC (rev 5777)
+++ usertools/plotter/src/plotter/Dual.java	2012-04-30 16:58:45 UTC (rev 5778)
@@ -3,7 +3,6 @@
 import gnu.getopt.Getopt;
 
 import java.awt.Color;
-import java.awt.Font;
 import java.awt.geom.Rectangle2D;
 import java.io.*;
 import java.util.*;
@@ -257,20 +256,19 @@
     }
 
     // Right Y axis setup
-    Font font = plot.getRangeAxis().getLabelFont();
-    final NumberAxis rightAxis = new NumberAxis(ylabel2);
-    rightAxis.setLabelFont(font);
-    plot.setRangeAxis(1, rightAxis);
+    // Font font = plot.getRangeAxis().getLabelFont();
+    // rightAxis.setLabelFont(font);
 
     // Right Y axis
     if (ymin2 != null || ymax2 != null)
     {
-      Range range = rightAxis.getRange();
+      NumberAxis axis = (NumberAxis) plot.getRangeAxis(1);
+      Range range = axis.getRange();
       aymin2 = range.getLowerBound();
       aymax2 = range.getUpperBound();
       if (ymin2 != null) aymin2 = ymin2;
       if (ymax2 != null) aymax2 = ymax2;
-      rightAxis.setRange(aymin2, aymax2);
+      axis.setRange(aymin2, aymax2);
     }
 
     plot.mapDatasetToRangeAxis(0, 0);
@@ -289,7 +287,6 @@
       throw new RuntimeException
       ("Invalid axis.x type: " + axis_x_type);
 
-
     NumberAxis axis_y1;
     if (axis_y1_type.equals("normal"))
       axis_y1 = new NumberAxis(ylabel1);




More information about the Swift-commit mailing list