3 @description class plot_t is defined here
4 licensed under (open-source) QPL v1.0
5 which accompanies this distribution in the file QPL
10 #include "sd_line_t.hpp"
11 #include "line_window_onevar_t.hpp"
13 class line_real_set_t;
17 typedef std::list<line_window_onevar_t> data_manyexecs_t;
19 /** ultimate window-coord class: holds SEVERAL vars' info and can plot them in different colors */
22 int myWidth, myHeight;
23 data_manyexecs_t data;
29 int xwmin, xwmax, ywmin, ywmax, xwrange, ywrange;
30 double xscalar, yscalar;
31 QString plotName, XAxisName, YAxisName;
34 * prepare a plot based on line_real_set_t and WIDTH and HEIGHT args
35 * name can be set in setName()
37 plot_t(line_real_set_t& LRS, int WIDTH=sd_line_t::WIDTH, int HEIGHT=sd_line_t::HEIGHT);
39 /** give a name to this plot_t object */
40 void setName(QString& inName);
42 void setXAxisName(QString& inNameX);
44 void setYAxisName(QString& inNameY);
46 /** calculate and make appropriate and human-oriented range increment for Y Axis:
47 * 1, 2, or 5 times a power of 10
48 * such there are usually about 10 to 20 marks on the axis
49 * this calibration can be fudged to about halve or double the number of notches
51 void makeNotchesOnYAxis(QPainter& P);
53 /** just like the above, slightly trickier since we only want integers
55 void makeNotchesOnXAxis(QPainter& P);
57 /** plot the plot_t object */
58 void plot(QPainter& P);
59 void plotGray(QPainter& P);