2 * psychlops_figure_visualization.h
3 * Psychlops Standard Library (Universal)
5 * Last Modified 2009/10/05 by Kenchi HOSOKAWA
6 * (C) 2009 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO
9 #ifndef HEADER_PSYCHLOPS_FIGURE_VISUALIZATION
10 #define HEADER_PSYCHLOPS_FIGURE_VISUALIZATION
12 #include "../../../core/graphic/psychlops_g_fundamental.h"
13 #include "../../../psychlops_core.h"
21 class XYPlot : public Rectangle {
23 double Xpix(double x);
24 double Ypix(double y);
26 double x_min, x_max, y_min, y_max;
28 XYPlot(double wid, double hei);
29 XYPlot(double wid, double hei, Interval x_a, Interval y_a);
30 XYPlot& set(double wid, double hei);
31 XYPlot& set(double wid, double hei, Interval x_a, Interval y_a);
32 XYPlot& setInterval(Interval x_a, Interval y_a);
35 class FunctionalPlot : public XYPlot {
37 typedef double (*OneDimFun)(double);
38 std::deque< OneDimFun > functions;
40 FunctionalPlot(double wid, double hei);
41 FunctionalPlot& set(double wid, double hei);
42 FunctionalPlot& append(OneDimFun fun);
43 FunctionalPlot& draw(Drawable &target = *Drawable::prime);
46 class LinePlot : public XYPlot {
48 std::deque< std::deque<double> > table;
51 LinePlot(double wid, double hei);
52 LinePlot& set(double wid, double hei);
53 void setTableSize(int n_seq, int n_elems);
54 void push_pop(double x, int seq_index=0);
55 LinePlot& draw(Drawable &target = *Drawable::prime);
59 } /* <- namespace Figure */
60 } /* <- namespace Psycholops */