X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tools%2Fif2.cpp;h=2b69d27f12fb1e05ad4cd5b9b1df8d47d390af5a;hb=d16eb37cbc73f67fc29a60645e0b1ac7fe32767e;hp=c49b5a4e482ddd555c8483fe54ef8b256977c609;hpb=c551b53b39a7571cf52831f5e117be1cca95c420;p=ctsim.git diff --git a/tools/if2.cpp b/tools/if2.cpp index c49b5a4..2b69d27 100644 --- a/tools/if2.cpp +++ b/tools/if2.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: if2.cpp,v 1.4 2000/12/22 04:18:00 kevin Exp $ +** $Id: if2.cpp,v 1.7 2001/01/09 22:31:47 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 @@ -46,7 +46,7 @@ static struct option my_options[] = {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: if2.cpp,v 1.4 2000/12/22 04:18:00 kevin Exp $"; +static const char* g_szIdStr = "$Id: if2.cpp,v 1.7 2001/01/09 22:31:47 kevin Exp $"; void if2_usage (const char *program) @@ -237,29 +237,20 @@ if2_main (int argc, char *const argv[]) plotFile.addColumn (0, plot_xaxis); plotFile.addColumn (1, v1[opt_columnPlot]); plotFile.addColumn (2, v2[opt_columnPlot]); - plotFile.setTitle ("Column Plot"); - plotFile.setXLabel ("Column"); - plotFile.setYLabel ("Pixel Value"); - + std::ostringstream os; + os << "Column " << opt_columnPlot << " Comparison"; + plotFile.addDescription (os.str().c_str()); + std::string title("title "); + title += os.str(); + plotFile.addEzsetCommand (title.c_str()); + plotFile.addEzsetCommand ("xlabel Column"); + plotFile.addEzsetCommand ("ylabel Pixel Value"); + plotFile.addEzsetCommand ("box"); + plotFile.addEzsetCommand ("grid"); + plotFile.addEzsetCommand ("xticks major 5"); + plotFile.fileWrite (strOutFile.c_str()); -#if HAVE_SGP - SGPDriver driver ("Column Plot"); - SGP sgp (driver); - EZPlot ezplot (sgp); - ezplot.ezset ("clear."); - ezplot.ezset ("xticks major 5."); - ezplot.ezset ("xlabel Column"); - ezplot.ezset ("title Column Plot"); - ezplot.ezset ("ylabel Pixel"); - ezplot.ezset ("box."); - ezplot.ezset ("grid."); - ezplot.addCurve (plot_xaxis, v1[opt_columnPlot], im_in1.ny()); - ezplot.addCurve (plot_xaxis, v2[opt_columnPlot], im_in2.ny()); - ezplot.plot(); - std::cout << "Press enter to continue" << flush; - cio_kb_getc(); -#endif delete plot_xaxis; } @@ -284,29 +275,20 @@ if2_main (int argc, char *const argv[]) plotFile.addColumn (0, plot_xaxis); plotFile.addColumn (1, v1Row); plotFile.addColumn (2, v2Row); - plotFile.setTitle ("Row Plot"); - plotFile.setXLabel ("Row"); - plotFile.setYLabel ("Pixel Value"); + std::ostringstream os; + os << "Row " << opt_rowPlot << " Comparison"; + plotFile.addDescription (os.str().c_str()); + std::string title("title "); + title += os.str(); + plotFile.addEzsetCommand (title.c_str()); + plotFile.addEzsetCommand ("xlabel Row"); + plotFile.addEzsetCommand ("ylabel Pixel Value"); + plotFile.addEzsetCommand ("box"); + plotFile.addEzsetCommand ("grid"); + plotFile.addEzsetCommand ("xticks major 5"); plotFile.fileWrite (strOutFile.c_str()); -#if HAVE_SGP - SGPDriver driver ("Row Plot"); - SGP sgp (driver); - EZPlot ezplot (sgp); - ezplot.ezset ("clear."); - ezplot.ezset ("xticks major 5."); - ezplot.ezset ("title Row Plot"); - ezplot.ezset ("xlabel Row"); - ezplot.ezset ("ylabel Pixel"); - ezplot.ezset ("box."); - ezplot.ezset ("grid."); - ezplot.addCurve (plot_xaxis, v1Row, im_in1.nx()); - ezplot.addCurve (plot_xaxis, v2Row, im_in2.nx()); - ezplot.plot(); - std::cout << "Press enter to continue" << flush; - cio_kb_getc(); -#endif delete plot_xaxis; delete v1Row; delete v2Row;