/[ascend]/trunk/pygtk/plot.h
ViewVC logotype

Annotation of /trunk/pygtk/plot.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2057 - (hide annotations) (download) (as text)
Thu Jun 25 10:27:30 2009 UTC (11 years, 3 months ago) by jpye
File MIME type: text/x-chdr
File size: 1265 byte(s)
Merging changes changeset 2379 into trunk (accidentally commited to branch).
1 johnpye 175 #ifndef ASCXX_PLOT_H
2     #define ASCXX_PLOT_H
3    
4     #include <vector>
5     #include <string>
6    
7     #include "instance.h"
8 johnpye 181
9     #ifndef ASCXX_CURVE_H
10 johnpye 176 #include "curve.h"
11 johnpye 181 #else
12     class Curve;
13     #endif
14 johnpye 175
15     #define PLOT_TITLE "title"
16     #define PLOT_XLABEL "XLabel"
17 johnpye 176 #define PLOT_YLABEL "YLabel"
18 johnpye 175 #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 jpye 2057 #define PLOT_FORMAT "format"
27 johnpye 175 #define PLOT_POINT "pnt"
28     #define PLOT_XPOINT "x"
29     #define PLOT_YPOINT "y"
30    
31    
32     /**
33     This is interface for accessing plottable data from ASCEND. It's needed in order
34     to cleanly access the MatPlotLib commands via Python, but it could also be used to
35     abstract the xgraph plotting code somewhat as well.
36     */
37     class Plot : public Instanc{
38 johnpye 176
39     private:
40     friend class Instanc;
41 johnpye 1198 explicit Plot(const Instanc &);
42     Plot();
43 johnpye 175 public:
44 johnpye 1198 Plot(const Plot &plot);
45    
46 johnpye 175 const std::string getTitle() const;
47     const std::string getXLabel() const;
48     const std::string getYLabel() const;
49     const bool isXLog() const;
50     const bool isYLog() const;
51     const double getXLow() const;
52     const double getXHigh() const;
53     const double getYLow() const;
54     const double getYHigh() const;
55    
56     std::vector<Curve> curves;
57     };
58    
59     #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22