r162: *** empty log message ***
[ctsim.git] / tools / if-2.cpp
index 525330ea568fcf0813da766d724ba2ad412a21b4..2558360f32341352d12a4ab612fbc93ae4405d76 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: if-2.cpp,v 1.1 2000/07/13 07:01:35 kevin Exp $
+**  $Id: if-2.cpp,v 1.2 2000/07/28 08:28:08 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -228,22 +228,20 @@ if2_main (int argc, char *const argv[])
     for (int i = 0; i < nx; i++)
       plot_xaxis[i] = i;
 #if HAVE_SGP
-#if 0
-#else
-    ezset  ("clear.");
-    ezset  ("xticks major 5.");
-    ezset  ("xlabel Column");
-    ezset  ("ylabel Pixel");
-    ezset ("curves 2");
-    ezset  ("box.");
-    ezset  ("grid.");
-    ezplot (v1[opt_columnPlot], plot_xaxis, im_in1.ny());
-    ezplot (v2[opt_columnPlot], plot_xaxis, im_in2.ny());
-#endif
-    char str[256];
+    SGPDriver driver ("Column Plot");
+    SGP sgp (driver);
+    EZPlot ezplot (sgp);
+    ezplot.ezset  ("clear.");
+    ezplot.ezset  ("xticks major 5.");
+    ezplot.ezset  ("xlabel Column");
+    ezplot.ezset  ("ylabel Pixel");
+    ezplot.ezset ("curves 2");
+    ezplot.ezset  ("box.");
+    ezplot.ezset  ("grid.");
+    ezplot.addCurve (v1[opt_columnPlot], plot_xaxis, im_in1.ny());
+    ezplot.addCurve (v2[opt_columnPlot], plot_xaxis, im_in2.ny());
     cout << "Press enter to continue" << flush;
-    fgets(str, sizeof(str), stdin);
-    sgp2_close (sgp2_get_active_win());
+    cio_kb_getc();
 #endif
   }
 
@@ -263,22 +261,20 @@ if2_main (int argc, char *const argv[])
       v2Row[i] = v2[opt_rowPlot][i];
 
 #if HAVE_SGP
-#if 0
-#else
-    ezset  ("clear.");
-    ezset  ("xticks major 5.");
-    ezset  ("xlabel Column");
-    ezset  ("ylabel Pixel");
-    ezset ("curves 2");
-    ezset  ("box.");
-    ezset  ("grid.");
-    ezplot (v1Row, plot_xaxis, im_in1.nx());
-    ezplot (v2Row, plot_xaxis, im_in2.nx());
-#endif
-    char str[256];
+    SGPDriver driver ("Column Plot");
+    SGP sgp (driver);
+    EZPlot ezplot (sgp);
+    ezplot.ezset  ("clear.");
+    ezplot.ezset  ("xticks major 5.");
+    ezplot.ezset  ("xlabel Column");
+    ezplot.ezset  ("ylabel Pixel");
+    ezplot.ezset ("curves 2");
+    ezplot.ezset  ("box.");
+    ezplot.ezset  ("grid.");
+    ezplot.addCurve (v1Row, plot_xaxis, im_in1.nx());
+    ezplot.addCurve (v2Row, plot_xaxis, im_in2.nx());
     cout << "Press enter to continue" << flush;
-    fgets(str, sizeof(str), stdin);
-    sgp2_close (sgp2_get_active_win());
+    cio_kb_getc();
 #endif
   }