X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctgraphics%2Fezplot.cpp;h=5a2ec69a34a2700a309722310ee61cc19bfb4e0c;hp=8d7b516bb3dd495c98932cebdbe99437f39e4881;hb=fd1d136a94a6d20013f38d6a997bdfefad0f5e98;hpb=ee0105d74fec9d6bfd236e22e9e1d315e46c568e diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 8d7b516..5a2ec69 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezplot.cpp,v 1.16 2000/12/06 01:46:43 kevin Exp $ +** $Id: ezplot.cpp,v 1.20 2000/12/20 20:08:48 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 @@ -32,12 +32,10 @@ int snprintf (char *, size_t, const char*, ...); // Defaults static const double TICKRATIO = 0.4; // ratio of minor to major tick lengths static const int MAXNUMFMT = 15; // maximum length of a numeric format -static const double DEF_CHARHEIGHT = (1./43.); //size of characters in NDC -static const double DEF_CHARWIDTH = (1./80.); // size of characters in NDC static const int DEF_CURVE_CLR = C_RED; -EZPlotCurve::EZPlotCurve (const double* xData, const double* yData, int n, int color, int linestyle, int symbol, int symfreq, const string& legend) +EZPlotCurve::EZPlotCurve (const double* xData, const double* yData, int n, int color, int linestyle, int symbol, int symfreq, const std::string& legend) : x(NULL), y(NULL), m_sLegend (legend) { x = new double [n]; @@ -149,8 +147,8 @@ EZPlot::EZPlot (SGP& sgp) void EZPlot::initPlotSettings () { - charheight = DEF_CHARHEIGHT; - charwidth = DEF_CHARWIDTH; + charheight = rSGP.getCharHeight(); + charwidth = rSGP.getCharWidth(); c_xlabel = ""; c_ylabel = ""; @@ -755,7 +753,7 @@ EZPlot::drawAxes() if (o_ytlabel == TRUE && axis_near == FALSE) { snprintf (str, sizeof(str), y_numfmt, ygw_min + yw_tickinc * i); rSGP.moveAbs (yaxispos + ytl_ofs, y + 0.5 * charheight); - rSGP.setTextColor (clr_number, -1); + rSGP.setTextColor (clr_number, -1); rSGP.drawText (str); } }