1 #include <nana/gui.hpp>
2 #include <nana/gui/widgets/label.hpp>
3 #include <nana/gui.hpp>
22 : myType( eType::
plot )
33 myType = eType::realtime;
42 myType = eType::point;
54 void set(
const std::vector< double >& y );
72 void add(
double x,
double y );
75 void color(
const colors & clr )
88 return (
int) myY.size();
91 void bounds(
int& min,
int& max );
94 void update( paint::graphics& graph );
98 std::vector< double > myX;
99 std::vector< double > myY;
126 void update( paint::graphics& graph );
143 plot( window parent );
160 myTrace.push_back( t );
177 myTrace.push_back( t );
189 int Y2Pixel(
double y )
const
191 return myYOffset - myScale * y;
225 API::refresh_window( myParent );
230 for(
auto t : myTrace )
232 std::cout <<
"debugtsize " << t->size() <<
"\n";
244 std::vector< trace* > myTrace;
256 void CalcScale(
int w,
int h );
259 void RegisterDrawingFunction();
Draw decorated vertical line on LHS of plot for Y-axis.
Definition: plot2d.h:114
Single trace to be plotted.
Definition: plot2d.h:12
void update(paint::graphics &graph)
draw
Definition: plot2d.cpp:241
void points()
Definition: plot2d.h:40
Draw a 2D plot.
Definition: plot2d.h:136
void realTime(int w)
Definition: plot2d.h:31
void color(const colors &clr)
set color
Definition: plot2d.h:75
void update(paint::graphics &graph)
draw
Definition: plot2d.cpp:135
void add(double y)
Definition: plot2d.cpp:99
void set(const std::vector< double > &y)
Definition: plot2d.cpp:87
plot(window parent)
Definition: plot2d.cpp:9
trace & AddStaticTrace()
Add static trace.
Definition: plot2d.h:156
trace()
Definition: plot2d.h:21
trace & AddPointTrace()
Add point trace.
Definition: plot2d.cpp:17
trace & AddRealTimeTrace(int w)
Add real time trace.
Definition: plot2d.h:172
void Plot(plot *p)
set plot where this trace will appear
Definition: plot2d.h:81