** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ezplot.h,v 1.14 2000/09/04 09:06:46 kevin Exp $
+** $Id: ezplot.h,v 1.18 2000/12/16 06:12: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
#ifndef __H_EZPLOT
#define __H_EZPLOT
-#include <stdio.h>
+#include <cstdio>
+#include <cctype>
+#include <cmath>
#include <stddef.h>
-#include <ctype.h>
-#include <math.h>
#include "ctsupport.h"
#include "sgp.h"
int m_iSymbol;
int m_iSymbolFreq;
int m_iColor;
- string m_sLegend;
+ std::string m_sLegend;
- EZPlotCurve (const double* x, const double* y, int n, int color, int linestyle, int symbol, int sumbolFreq, const string& legend);
+ EZPlotCurve (const double* x, const double* y, int n, int color, int linestyle, int symbol, int sumbolFreq, const std::string& legend);
~EZPlotCurve();
};
*---------------------------------------------------------------------------*/
#include <vector>
-using namespace std;
-typedef vector<EZPlotCurve*>::iterator EZPlotCurveIterator;
-typedef vector<EZPlotCurve*>::const_iterator EZPlotCurveConstIterator;
+typedef std::vector<EZPlotCurve*>::iterator EZPlotCurveIterator;
+typedef std::vector<EZPlotCurve*>::const_iterator EZPlotCurveConstIterator;
class SGP;
class EZPlot {
private:
- vector<class EZPlotCurve*> m_vecCurves;
+ std::vector<class EZPlotCurve*> m_vecCurves;
// Colors
int clr_axis; // color of all axis lines
double o_xporigin, o_yporigin; // origin of plot frame in NDC
double o_xlength, o_ylength; // length of plot frame in NDC
- string c_xlabel; // label for x axis
- string c_ylabel; // label for y axis
- string c_title; // title to print above graph
- string c_legend;; // current legend specified
+ std::string c_xlabel; // label for x axis
+ std::string c_ylabel; // label for y axis
+ std::string c_title; // title to print above graph
+ std::string c_legend;; // current legend specified
int o_linestyle, o_color; // style to use for curves all subsequent curves to EZPLOT
- bool o_xaxis, o_yaxis; // Specifies where axis & labels are drawn
+ int o_xaxis, o_yaxis; // Specifies where axis & labels are drawn
bool o_grid; // Flag to draw a grid at major ticks
bool o_box; // Flag to draw a box around the graph
void clearCurves ();
bool ezcmd (char *comm);
- int do_cmd(int lx);
+ bool do_cmd(int lx);
void bad_option(char *opt);
void initPlotSettings();