Plot2d
 All Classes Functions
Public Member Functions | List of all members
nana::plot::trace Class Reference

Single trace to be plotted. More...

#include <plot2d.h>

Public Member Functions

 trace ()
 
void realTime (int w)
 
void points ()
 
void set (const std::vector< double > &y)
 
void add (double y)
 
void add (double x, double y)
 
void color (const colors &clr)
 set color
 
void Plot (plot *p)
 set plot where this trace will appear
 
int size ()
 
void bounds (int &min, int &max)
 
void update (paint::graphics &graph)
 draw
 

Detailed Description

Single trace to be plotted.

Constructor & Destructor Documentation

nana::plot::trace::trace ( )
inline

CTOR Application code should not call this constructor Rather call one of plot::AddPointTrace, plot::AddRealTimeTrace or plot::AddStaticTrace

Member Function Documentation

void nana::plot::trace::add ( double  y)

add new value to real time data

Parameters
[in]ythe new data point

An exception is thrown when this is called for a trace that has not been converted to real time

void nana::plot::trace::add ( double  x,
double  y 
)

/brief add point to point trace

Parameters
[in]xlocation
[in]ylocation

An exception is thrown when this is called for a trace that has not been converted to points

void nana::plot::trace::points ( )
inline

Convert trace to point operation for scatter plots

void nana::plot::trace::realTime ( int  w)
inline

Convert trace to real time operation

Parameters
[in]wnumber of data points to display

Data points older than w scroll off the left edge of the plot and are lost

void nana::plot::trace::set ( const std::vector< double > &  y)

set static data

Parameters
[in]yvector of data points to display

Replaces any existing data. Plot is NOT refreshed. An exception is thrown when this is called for a trace that has been converted to real time.


The documentation for this class was generated from the following files: