1 |
#ifndef ASCXX_PLOT_H |
2 |
#define ASCXX_PLOT_H |
3 |
|
4 |
#include <vector> |
5 |
#include <string> |
6 |
|
7 |
#include "instance.h" |
8 |
|
9 |
#ifndef ASCXX_CURVE_H |
10 |
#include "curve.h" |
11 |
#else |
12 |
class Curve; |
13 |
#endif |
14 |
|
15 |
#define PLOT_TITLE "title" |
16 |
#define PLOT_XLABEL "XLabel" |
17 |
#define PLOT_YLABEL "YLabel" |
18 |
#define PLOT_XLOG "Xlog" |
19 |
#define PLOT_YLOG "Ylog" |
20 |
#define PLOT_XLO "Xlow" |
21 |
#define PLOT_XHI "Xhigh" |
22 |
#define PLOT_YLO "Ylow" |
23 |
#define PLOT_YHI "Yhigh" |
24 |
#define PLOT_CURVE "curve" |
25 |
#define PLOT_LEGEND "legend" |
26 |
#define PLOT_FORMAT "format" |
27 |
#define PLOT_LEGENDPOSITION "legend_position" |
28 |
#define PLOT_POINT "pnt" |
29 |
#define PLOT_XPOINT "x" |
30 |
#define PLOT_YPOINT "y" |
31 |
|
32 |
|
33 |
/** |
34 |
This is interface for accessing plottable data from ASCEND. It's needed in order |
35 |
to cleanly access the MatPlotLib commands via Python, but it could also be used to |
36 |
abstract the xgraph plotting code somewhat as well. |
37 |
*/ |
38 |
class Plot : public Instanc{ |
39 |
|
40 |
private: |
41 |
friend class Instanc; |
42 |
explicit Plot(const Instanc &); |
43 |
Plot(); |
44 |
public: |
45 |
Plot(const Plot &plot); |
46 |
|
47 |
const std::string getTitle() const; |
48 |
const std::string getXLabel() const; |
49 |
const std::string getYLabel() const; |
50 |
|
51 |
/** |
52 |
Get 'legend position', an integer for use by matplotlib, see here for |
53 |
documentation: |
54 |
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend |
55 |
|
56 |
This value is not used by the Tcl/Tk GUI's plotting routine. |
57 |
*/ |
58 |
const int getLegendPosition() const; |
59 |
|
60 |
const bool isXLog() const; |
61 |
const bool isYLog() const; |
62 |
const double getXLow() const; |
63 |
const double getXHigh() const; |
64 |
const double getYLow() const; |
65 |
const double getYHigh() const; |
66 |
|
67 |
std::vector<Curve> curves; |
68 |
}; |
69 |
|
70 |
#endif |