X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctgraphics%2Fezplot.cpp;h=348dd3f170d4fd06892c50d73b4e9bea8422f9cd;hb=e36dfad3f0818b4c3457fbe7277faa6f4ca28dfe;hp=519b7f97396bd398cd710b4e03f841d8d1077090;hpb=c85a5b31119b4e0903144c55441717a7ad1e0b8b;p=ctsim.git diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 519b7f9..348dd3f 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.8 2000/07/28 10:51:31 kevin Exp $ +** $Id: ezplot.cpp,v 1.10 2000/08/19 22:59:06 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 @@ -31,7 +31,7 @@ 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_YELLOW; +static const int DEF_CURVE_CLR = C_RED; @@ -130,13 +130,11 @@ EZPlot::EZPlot (SGP& sgp) void EZPlot::initPlotSettings () { - curveinteract = -1; - charwidth = DEF_CHARWIDTH; charheight = DEF_CHARHEIGHT; - c_xlabel = "X axis"; - c_ylabel = "Y axis"; + c_xlabel = ""; + c_ylabel = ""; c_title = ""; c_legend = ""; @@ -179,12 +177,12 @@ EZPlot::initPlotSettings () s_ylegend = FALSE; s_textsize = FALSE; - clr_axis = C_WHITE; /* set fixed colors */ - clr_title = (C_CYAN+8); - clr_label = (C_CYAN+8); - clr_legend = (C_RED+8); - clr_number = (C_GREEN+8); - clr_grid = (C_BLACK+8); + clr_axis = C_BLACK; /* set fixed colors */ + clr_title = C_CYAN; + clr_label = C_CYAN; + clr_legend = C_RED; + clr_number = C_GREEN; + clr_grid = C_LTGRAY; } @@ -255,8 +253,8 @@ EZPlot::plot () } /* find nice endpoints for axes */ - axis_scale (xmin, xmax, o_xmajortick - 1, &xgw_min, &xgw_max, &x_nint); - axis_scale (ymin, ymax, o_ymajortick - 1, &ygw_min, &ygw_max, &y_nint); + if (! axis_scale (xmin, xmax, o_xmajortick - 1, &xgw_min, &xgw_max, &x_nint) || ! axis_scale (ymin, ymax, o_ymajortick - 1, &ygw_min, &ygw_max, &y_nint)) + return; /* check if user set x-axis extents */ if (s_xmin == TRUE) {