Main MRPT website > C++ reference
MRPT logo

mpProfile Class Reference

Abstract base class providing plot and labeling functionality for functions F:Y->X. More...

#include <mrpt/otherlibs/mathplot/mathplot.h>

Inheritance diagram for mpProfile:
Inheritance graph
[legend]
Collaboration diagram for mpProfile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mpProfile (wxString name=wxEmptyString, int flags=mpALIGN_TOP)
virtual double GetY (double x)=0
 Get function value for argument.
virtual void Plot (wxDC &dc, mpWindow &w)
 Layer plot handler.

Protected Attributes

int m_flags
 Holds label alignment.

Detailed Description

Abstract base class providing plot and labeling functionality for functions F:Y->X.

Override mpProfile::GetX to implement a function. This class is similar to mpFY, but the Plot method is different. The plot is in fact represented by lines instead of points, which gives best rendering of rapidly-varying functions, and in general, data which are not so close one to another. Optionally implement a constructor and pass a name (label) and a label alignment to the constructor mpProfile::mpProfile. If the layer name is empty, no label will be plotted.

Definition at line 645 of file mathplot.h.


Constructor & Destructor Documentation

mpProfile::mpProfile ( wxString  name = wxEmptyString,
int  flags = mpALIGN_TOP 
)
Parameters:
name Label
flags Label alignment, pass one of mpALIGN_BOTTOM, mpALIGN_CENTER, mpALIGN_TOP.

Member Function Documentation

virtual double mpProfile::GetY ( double  x  )  [pure virtual]

Get function value for argument.

Override this function in your implementation.

Parameters:
x Argument
Returns:
Function value
virtual void mpProfile::Plot ( wxDC &  dc,
mpWindow w 
) [virtual]

Layer plot handler.

This implementation will plot the function in the visible area and put a label according to the aligment specified.

Implements mpLayer.


Member Data Documentation

int mpProfile::m_flags [protected]

Holds label alignment.

Definition at line 667 of file mathplot.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010