** 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
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
}
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
}