ESP  0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
Plotter Class Reference

#include <plotter.h>

Inheritance diagram for Plotter:
InteractivePlot

Public Member Functions

 Plotter ()
 
bool setup (uint32_t num_dimensions, string title, string subtitle="")
 
bool setData (const GRT::MatrixDouble &data)
 
bool clearContentModifiedFlag ()
 
bool push_back (const vector< double > &data_point)
 
virtual GRT::MatrixDouble & getData ()
 
virtual MatrixDouble getData (uint32_t x_start_idx, uint32_t x_end_idx)
 
virtual vector< double > getData (uint32_t x_idx)
 
bool setRanges (float minY, float maxY, bool lockRanges=false)
 
std::pair< float, float > getRanges ()
 
bool setColorPalette (const vector< ofColor > &colors)
 
bool setTitle (const string &title)
 
void renameTitleStart ()
 
void renameTitleDone ()
 
const string & getTitle () const
 
bool draw (uint32_t x, uint32_t y, uint32_t w, uint32_t h)
 
bool reset ()
 
bool clearData ()
 
void setBackgroundColor (ofColor color)
 
void setTextColor (ofColor color)
 
void setGridColor (ofColor color)
 
- Public Member Functions inherited from InteractivePlot
 InteractivePlot ()
 
void onRangeSelected (const onRangeSelectedCallback &cb, void *data=nullptr)
 
template<typename T1 , typename arg , class T >
void onRangeSelected (T1 *owner, void(T::*listenerMethod)(arg), void *data=nullptr)
 
void onValueHighlighted (const onValueHighlightedCallback &cb, void *data=nullptr)
 
template<typename T1 , typename arg , class T >
void onValueHighlighted (T1 *owner, void(T::*listenerMethod)(arg), void *data=nullptr)
 
std::pair< uint32_t, uint32_t > getSelection ()
 
void clearSelection ()
 

Protected Member Functions

virtual uint32_t mouseCoordinateToIndex (uint32_t x)
 
- Protected Member Functions inherited from InteractivePlot
bool contains (uint32_t x, uint32_t y)
 
void mouseMoved (ofMouseEventArgs &arg)
 
void startSelection (ofMouseEventArgs &arg)
 
void duringSelection (ofMouseEventArgs &arg)
 
void normalize ()
 
void endSelection (ofMouseEventArgs &arg)
 

Additional Inherited Members

- Public Types inherited from InteractivePlot
typedef std::function< void(RangeSelectedCallbackArgs)> onRangeSelectedCallback
 
typedef std::function< void(ValueHighlightedCallbackArgs)> onValueHighlightedCallback
 
- Protected Attributes inherited from InteractivePlot
uint32_t x_
 
uint32_t y_
 
uint32_t w_
 
uint32_t h_
 
uint32_t x_move_
 
uint32_t x_click_
 
uint32_t x_release_
 
uint32_t x_start_
 
uint32_t x_end_
 
bool is_tracking_mouse_
 
onRangeSelectedCallback range_selected_callback_
 
void * range_selected_callback_data_
 
onValueHighlightedCallback value_highlighted_callback_
 
void * value_highlighted_callback_data_
 

Constructor & Destructor Documentation

Plotter::Plotter ( )

Member Function Documentation

bool Plotter::clearContentModifiedFlag ( )
bool Plotter::clearData ( )
bool Plotter::draw ( uint32_t  x,
uint32_t  y,
uint32_t  w,
uint32_t  h 
)
virtual GRT::MatrixDouble& Plotter::getData ( )
inlinevirtual
virtual MatrixDouble Plotter::getData ( uint32_t  x_start_idx,
uint32_t  x_end_idx 
)
inlinevirtual

Implements InteractivePlot.

virtual vector<double> Plotter::getData ( uint32_t  x_idx)
inlinevirtual

Implements InteractivePlot.

std::pair< float, float > Plotter::getRanges ( )
const string & Plotter::getTitle ( ) const
virtual uint32_t Plotter::mouseCoordinateToIndex ( uint32_t  x)
inlineprotectedvirtual

Implements InteractivePlot.

bool Plotter::push_back ( const vector< double > &  data_point)
void Plotter::renameTitleDone ( )
void Plotter::renameTitleStart ( )
bool Plotter::reset ( )
void Plotter::setBackgroundColor ( ofColor  color)
inline
bool Plotter::setColorPalette ( const vector< ofColor > &  colors)
bool Plotter::setData ( const GRT::MatrixDouble &  data)
void Plotter::setGridColor ( ofColor  color)
inline
bool Plotter::setRanges ( float  minY,
float  maxY,
bool  lockRanges = false 
)
void Plotter::setTextColor ( ofColor  color)
inline
bool Plotter::setTitle ( const string &  title)
bool Plotter::setup ( uint32_t  num_dimensions,
string  title,
string  subtitle = "" 
)

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