|
| void | set (const std::vector< double > &y) |
| | set plot data More...
|
| |
| void | set (double *begin, double *end) |
| | set plot data from raw buffer of doubles More...
|
| |
|
void | setScatterX (const std::vector< double > &x) |
| |
|
std::vector< double > | get () const |
| |
| void | add (double y) |
| | add new value to real time data More...
|
| |
| void | add (double x, double y) |
| | add point to scatter trace More...
|
| |
|
void | clear () |
| | clear data from trace
|
| |
|
void | color (int clr) |
| | set color
|
| |
|
int | color () const |
| |
|
void | thick (int t) |
| | set trace thickness in pixels
|
| |
|
int | thick () const |
| |
|
int | size () const |
| | get number of points
|
| |
| double | value (double xfraction) |
| | y value at fractional position along x-axis More...
|
| |
|
const std::vector< double > & | getX () const |
| |
|
const std::vector< double > & | getY () |
| |
Single trace to be plotted.
Application code should not attempt to construct a trace Rather call one of plot::AddPointTrace, plot::AddRealTimeTrace or plot::AddStaticTrace which return a reference to the trace which can be configured and be populated with data.
form fm;
construct plot to be drawn on form
plot::plot thePlot( fm );
construct plot trace
auto t1 = thePlot.AddStaticTrace();
provide some data for trace
std::vector< double > d1 { 10, 15, 20, 25, 30, 25, 20, 15, 10 };
t1.set( d1 );
plot in blue
t1.color( colors::blue );
show and run
fm.show();
exec();