Public Member Functions | Protected Attributes | Friends | List of all members

Allows to manage sub-windows of user-specified plot windows for algorithmic outputs (for internal use). More...

#include <plot_window_subplot.hpp>

Public Member Functions

returnValue addData (const VariablesGrid &_newData)
 
returnValue addLine (double _lineValue)
 
PlotWindowSubplotgetNext () const
 
uint getNumData () const
 
uint getNumLines () const
 
PlotName getPlotEnum () const
 
PlotFormat getPlotFormat () const
 
PlotMode getPlotMode () const
 
returnValue getRanges (double &_xRangeLowerLimit, double &_xRangeUpperLimit, double &_yRangeLowerLimit, double &_yRangeUpperLimit) const
 
SubPlotType getSubPlotType () const
 
returnValue getTitle (std::string &_title)
 
returnValue getXLabel (std::string &_xLabel)
 
ExpressiongetXPlotExpression () const
 
VariableType getXVariableType () const
 
returnValue getYLabel (std::string &_yLabel)
 
ExpressiongetYPlotExpression () const
 
VariableType getYVariableType () const
 
PlotWindowSubplotoperator= (const PlotWindowSubplot &rhs)
 
 PlotWindowSubplot ()
 
 PlotWindowSubplot (const Expression &_expression, const char *const _title="", const char *const _xLabel="", const char *const _yLabel="", PlotMode _plotMode=PM_UNKNOWN, double _xRangeLowerLimit=INFTY, double _xRangeUpperLimit=INFTY, double _yRangeLowerLimit=INFTY, double _yRangeUpperLimit=INFTY)
 
 PlotWindowSubplot (const Expression &_expressionX, const Expression &_expressionY, const char *const _title="", const char *const _xLabel="", const char *const _yLabel="", PlotMode _plotMode=PM_UNKNOWN, double _xRangeLowerLimit=INFTY, double _xRangeUpperLimit=INFTY, double _yRangeLowerLimit=INFTY, double _yRangeUpperLimit=INFTY)
 
 PlotWindowSubplot (PlotName _name, const char *const _title="", const char *const _xLabel="", const char *const _yLabel="", PlotMode _plotMode=PM_UNKNOWN, double _xRangeLowerLimit=INFTY, double _xRangeUpperLimit=INFTY, double _yRangeLowerLimit=INFTY, double _yRangeUpperLimit=INFTY)
 
 PlotWindowSubplot (const VariablesGrid &_plotVariable, const char *const _title="", const char *const _xLabel="", const char *const _yLabel="", PlotMode _plotMode=PM_UNKNOWN, double _xRangeLowerLimit=INFTY, double _xRangeUpperLimit=INFTY, double _yRangeLowerLimit=INFTY, double _yRangeUpperLimit=INFTY, BooleanType _plot3D=BT_FALSE)
 
 PlotWindowSubplot (const Curve &_curve, double _xRangeLowerLimit=0.0, double _xRangeUpperLimit=1.0, const char *const _title="", const char *const _xLabel="", const char *const _yLabel="", PlotMode _plotMode=PM_UNKNOWN, double _yRangeLowerLimit=INFTY, double _yRangeUpperLimit=INFTY)
 
 PlotWindowSubplot (const PlotWindowSubplot &rhs)
 
returnValue setNext (PlotWindowSubplot *const _next)
 
returnValue setPlotFormat (PlotFormat _plotFormat)
 
returnValue setPlotMode (PlotMode _plotMode)
 
returnValue setRanges (double _xRangeLowerLimit, double _xRangeUpperLimit, double _yRangeLowerLimit, double _yRangeUpperLimit)
 
returnValue setTitle (const std::string &_title)
 
returnValue setXLabel (const std::string &_xLabel)
 
returnValue setYLabel (const std::string &_yLabel)
 
 ~PlotWindowSubplot ()
 

Protected Attributes

VariablesGrid ** data
 
double * lineValues
 
uint nData
 
PlotWindowSubplotnext
 
uint nLines
 
BooleanType plot3D
 
PlotName plotEnum
 
ExpressionplotExpressionX
 
ExpressionplotExpressionY
 
PlotFormat plotFormat
 
PlotMode plotMode
 
VariablesGridplotVariablesGrid
 
ExpressionplotVariableX
 
ExpressionplotVariableY
 
std::string title
 
std::string xLabel
 
double xRangeLowerLimit
 
double xRangeUpperLimit
 
std::string yLabel
 
double yRangeLowerLimit
 
double yRangeUpperLimit
 

Friends

class GnuplotWindow
 

Detailed Description

Allows to manage sub-windows of user-specified plot windows for algorithmic outputs (for internal use).

The class PlotWindowSubplot allows to manage sub-windows of user-specified plot windows for algorithmic outputs to be plotted during runtime. It is intended for internal use only and is used by the class PlotWindow.

The class stores the internal name or the symbolic expression to be plotted within one sub-plot of a figure. Moreover, output settings like title, axis labels or ranges of the sub-plot are stored.

Note that PlotWindowSubplot is always stored in a basic singly-linked list within a PlotWindow. Thus, also a pointer to the next subplot is stored. Also the actual numerical data to be plotted is stored centrally for each PlotWindow.

Author
Hans Joachim Ferreau, Boris Houska

Definition at line 65 of file plot_window_subplot.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO PlotWindowSubplot::PlotWindowSubplot ( )

Default constructor.

Definition at line 46 of file plot_window_subplot.cpp.

PlotWindowSubplot::PlotWindowSubplot ( const Expression _expression,
const char *const  _title = "",
const char *const  _xLabel = "",
const char *const  _yLabel = "",
PlotMode  _plotMode = PM_UNKNOWN,
double  _xRangeLowerLimit = INFTY,
double  _xRangeUpperLimit = INFTY,
double  _yRangeLowerLimit = INFTY,
double  _yRangeUpperLimit = INFTY 
)

Constructor which takes the symbolic expression to be plotted along with settings defining the output format of the subplot.

Parameters
[in]_expressionSymbolic expression to be plotted on the y-axis.
[in]_titleTitle of the subplot.
[in]_xLabelLabel of x-axis of the subplot.
[in]_yLabelLabel of y-axis of the subplot.
[in]_plotModePlot mode, see the PlotMode documentation for details.
[in]_xRangeLowerLimitLower limit of the x-axis.
[in]_xRangeUpperLimitUpper limit of the x-axis.
[in]_yRangeLowerLimitLower limit of the y-axis.
[in]_yRangeUpperLimitUpper limit of the y-axis.

Definition at line 76 of file plot_window_subplot.cpp.

PlotWindowSubplot::PlotWindowSubplot ( const Expression _expressionX,
const Expression _expressionY,
const char *const  _title = "",
const char *const  _xLabel = "",
const char *const  _yLabel = "",
PlotMode  _plotMode = PM_UNKNOWN,
double  _xRangeLowerLimit = INFTY,
double  _xRangeUpperLimit = INFTY,
double  _yRangeLowerLimit = INFTY,
double  _yRangeUpperLimit = INFTY 
)

Constructor which takes symbolic expressions to be plotted along with settings defining the output format of the subplot.

Parameters
[in]_expressionXSymbolic expression to be plotted on the x-axis.
[in]_expressionYSymbolic expression to be plotted on the y-axis.
[in]_titleTitle of the subplot.
[in]_xLabelLabel of x-axis of the subplot.
[in]_yLabelLabel of y-axis of the subplot.
[in]_plotModePlot mode, see the PlotMode documentation for details.
[in]_xRangeLowerLimitLower limit of the x-axis.
[in]_xRangeUpperLimitUpper limit of the x-axis.
[in]_yRangeLowerLimitLower limit of the y-axis.
[in]_yRangeUpperLimitUpper limit of the y-axis.

Definition at line 128 of file plot_window_subplot.cpp.

PlotWindowSubplot::PlotWindowSubplot ( PlotName  _name,
const char *const  _title = "",
const char *const  _xLabel = "",
const char *const  _yLabel = "",
PlotMode  _plotMode = PM_UNKNOWN,
double  _xRangeLowerLimit = INFTY,
double  _xRangeUpperLimit = INFTY,
double  _yRangeLowerLimit = INFTY,
double  _yRangeUpperLimit = INFTY 
)

Constructor which takes the internal name of pre-defined information to be plotted along with settings defining the output format of the subplot.

Parameters
[in]_nameInternal name of pre-defined information to be plotted.
[in]_titleTitle of the subplot.
[in]_xLabelLabel of x-axis of the subplot.
[in]_yLabelLabel of y-axis of the subplot.
[in]_plotModePlot mode, see the PlotMode documentation for details.
[in]_xRangeLowerLimitLower limit of the x-axis.
[in]_xRangeUpperLimitUpper limit of the x-axis.
[in]_yRangeLowerLimitLower limit of the y-axis.
[in]_yRangeUpperLimitUpper limit of the y-axis.

Definition at line 182 of file plot_window_subplot.cpp.

PlotWindowSubplot::PlotWindowSubplot ( const VariablesGrid _plotVariable,
const char *const  _title = "",
const char *const  _xLabel = "",
const char *const  _yLabel = "",
PlotMode  _plotMode = PM_UNKNOWN,
double  _xRangeLowerLimit = INFTY,
double  _xRangeUpperLimit = INFTY,
double  _yRangeLowerLimit = INFTY,
double  _yRangeUpperLimit = INFTY,
BooleanType  _plot3D = BT_FALSE 
)

Constructor which takes discrete data to be plotted along with settings defining the output format of the subplot.

Parameters
[in]_variableDiscrete data to be plotted on the y-axis.
[in]_titleTitle of the subplot.
[in]_xLabelLabel of x-axis of the subplot.
[in]_yLabelLabel of y-axis of the subplot.
[in]_plotModePlot mode, see the PlotMode documentation for details.
[in]_xRangeLowerLimitLower limit of the x-axis.
[in]_xRangeUpperLimitUpper limit of the x-axis.
[in]_yRangeLowerLimitLower limit of the y-axis.
[in]_yRangeUpperLimitUpper limit of the y-axis.

Definition at line 221 of file plot_window_subplot.cpp.

PlotWindowSubplot::PlotWindowSubplot ( const Curve _curve,
double  _xRangeLowerLimit = 0.0,
double  _xRangeUpperLimit = 1.0,
const char *const  _title = "",
const char *const  _xLabel = "",
const char *const  _yLabel = "",
PlotMode  _plotMode = PM_UNKNOWN,
double  _yRangeLowerLimit = INFTY,
double  _yRangeUpperLimit = INFTY 
)

Constructor which takes ...

Definition at line 260 of file plot_window_subplot.cpp.

PlotWindowSubplot::PlotWindowSubplot ( const PlotWindowSubplot rhs)

Copy constructor (deep copy).

@param[in] rhs      Right-hand side object.

Definition at line 304 of file plot_window_subplot.cpp.

PlotWindowSubplot::~PlotWindowSubplot ( )

Destructor.

Definition at line 364 of file plot_window_subplot.cpp.

Member Function Documentation

returnValue PlotWindowSubplot::addData ( const VariablesGrid _newData)

Adds an additional discrete data points to be plotted within the subplot.

@param[in] _newData         Additional discrete data points.
Returns
SUCCESSFUL_RETURN

Definition at line 492 of file plot_window_subplot.cpp.

returnValue PlotWindowSubplot::addLine ( double  _lineValue)

Adds an additional horizontal lines to be plotted within the subplot.

@param[in] _lineValue       Y-value of the additional horizontal line.
Returns
SUCCESSFUL_RETURN

Definition at line 481 of file plot_window_subplot.cpp.

PlotWindowSubplot* PlotWindowSubplot::getNext ( ) const
inline

Returns pointer to next SubPlotWindow within a PlotWindow.

Returns
Pointer to next subplot (or NULL iff subplot is terminal element).
uint PlotWindowSubplot::getNumData ( ) const
inline

Returns number of additional discrete data grids of the subplot.

Returns
Number of additional discrete data grids
uint PlotWindowSubplot::getNumLines ( ) const
inline

Returns number of additional horizontal lines of the subplot.

Returns
Number of additional horizontal lines
PlotName PlotWindowSubplot::getPlotEnum ( ) const
inline

Returns name of pre-defined information to be plotted in the subplot.

Returns
Name of pre-defined information to be plotted
PlotFormat PlotWindowSubplot::getPlotFormat ( ) const
inline

Returns current plot format of the subplot.

Returns
Current plot format
PlotMode PlotWindowSubplot::getPlotMode ( ) const
inline

Returns current plot mode of the subplot.

Returns
Current plot mode
returnValue PlotWindowSubplot::getRanges ( double &  _xRangeLowerLimit,
double &  _xRangeUpperLimit,
double &  _yRangeLowerLimit,
double &  _yRangeUpperLimit 
) const
inline

Returns current ranges of the axes of the subplot.

@param[out] _xRangeLowerLimit       Current lower limit of the x-axis.
@param[out] _xRangeUpperLimit       Current upper limit of the x-axis.
@param[out] _yRangeLowerLimit       Current lower limit of the y-axis.
@param[out] _yRangeUpperLimit       Current upper limit of the y-axis.
Returns
SUCCESSFUL_RETURN
SubPlotType PlotWindowSubplot::getSubPlotType ( ) const
inline

Returns internal type of the subplot.

Returns
Internal type of the subplot
returnValue PlotWindowSubplot::getTitle ( std::string &  _title)
inline

Returns current title of the subplot.

@param[out]  _title         Current title.
Returns
SUCCESSFUL_RETURN
returnValue PlotWindowSubplot::getXLabel ( std::string &  _xLabel)
inline

Returns current label of x-axis of the subplot.

@param[out]  _xLabel                Current label of x-axis.
Returns
SUCCESSFUL_RETURN
Expression* PlotWindowSubplot::getXPlotExpression ( ) const
inline

Returns pointer to the expression on the x-axis of the subplot.

Returns
Pointer to the expression on the x-axis of the subplot.
VariableType PlotWindowSubplot::getXVariableType ( ) const
inline

Returns type of the variable on the x-axis of the subplot.

Returns
Type of the variable on the x-axis
returnValue PlotWindowSubplot::getYLabel ( std::string &  _yLabel)
inline

Returns current label of y-axis of the subplot.

@param[out]  _yLabel                Current label of y-axis.
Returns
SUCCESSFUL_RETURN
Expression* PlotWindowSubplot::getYPlotExpression ( ) const
inline

Returns pointer to the expression on the y-axis of the subplot.

Returns
Pointer to the expression on the y-axis of the subplot.
VariableType PlotWindowSubplot::getYVariableType ( ) const
inline

Returns type of the variable on the y-axis of the subplot.

Returns
Type of the variable on the x-axis
PlotWindowSubplot & PlotWindowSubplot::operator= ( const PlotWindowSubplot rhs)

Assignment operator (deep copy).

@param[in] rhs      Right-hand side object.

Definition at line 393 of file plot_window_subplot.cpp.

returnValue PlotWindowSubplot::setNext ( PlotWindowSubplot *const  _next)
inline

Assigns pointer to next SubPlotWindow within a PlotWindow.

@param[in]  _next   New pointer to next item.
Returns
SUCCESSFUL_RETURN
returnValue PlotWindowSubplot::setPlotFormat ( PlotFormat  _plotFormat)
inline

Sets plot format of the axes of the subplot.

@param[in]  _plotFormat             New plot format, see the PlotFormat documentation for details.
Returns
SUCCESSFUL_RETURN
returnValue PlotWindowSubplot::setPlotMode ( PlotMode  _plotMode)
inline

Sets plot mode of the subplot, defining how the data points are to be plotted.

@param[in]  _plotMode       New plot mode, see the PlotMode documentation for details.
Returns
SUCCESSFUL_RETURN
returnValue PlotWindowSubplot::setRanges ( double  _xRangeLowerLimit,
double  _xRangeUpperLimit,
double  _yRangeLowerLimit,
double  _yRangeUpperLimit 
)
inline

Sets ranges of the axes of the subplot.

@param[in] _xRangeLowerLimit        Lower limit of the x-axis.
@param[in] _xRangeUpperLimit        Upper limit of the x-axis.
@param[in] _yRangeLowerLimit        Lower limit of the y-axis.
@param[in] _yRangeUpperLimit        Upper limit of the y-axis.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS
returnValue PlotWindowSubplot::setTitle ( const std::string &  _title)
inline

Sets title of the subplot.

@param[in]  _title  New title.
Returns
SUCCESSFUL_RETURN
returnValue PlotWindowSubplot::setXLabel ( const std::string &  _xLabel)
inline

Sets label of x-axis of the subplot.

@param[in]  _xLabel         New label of x-axis.
Returns
SUCCESSFUL_RETURN
returnValue PlotWindowSubplot::setYLabel ( const std::string &  _yLabel)
inline

Sets label of y-axis of the subplot.

@param[in]  _yLabel         New label of y-axis.
Returns
SUCCESSFUL_RETURN

Friends And Related Function Documentation

friend class GnuplotWindow
friend

Definition at line 67 of file plot_window_subplot.hpp.

Member Data Documentation

VariablesGrid** PlotWindowSubplot::data
protected

Values of additional discrete data points to be plotted.

Definition at line 441 of file plot_window_subplot.hpp.

double* PlotWindowSubplot::lineValues
protected

Values of additional horizontal lines to be plotted.

Definition at line 438 of file plot_window_subplot.hpp.

uint PlotWindowSubplot::nData
protected

Number of additional discrete data points to be plotted.

Definition at line 440 of file plot_window_subplot.hpp.

PlotWindowSubplot* PlotWindowSubplot::next
protected

Pointer to next subplot within a PlotWindow.

Definition at line 443 of file plot_window_subplot.hpp.

uint PlotWindowSubplot::nLines
protected

Number of additional horizontal lines to be plotted.

Definition at line 437 of file plot_window_subplot.hpp.

BooleanType PlotWindowSubplot::plot3D
protected

Flag indicating whether data is to be plotted in 3D.

Definition at line 435 of file plot_window_subplot.hpp.

PlotName PlotWindowSubplot::plotEnum
protected

Pre-defined information to be plotted (on y-axis).

Definition at line 421 of file plot_window_subplot.hpp.

Expression* PlotWindowSubplot::plotExpressionX
protected

Continuous expression on x-axis to be plotted.

Definition at line 419 of file plot_window_subplot.hpp.

Expression* PlotWindowSubplot::plotExpressionY
protected

Continuous expression on x-axis to be plotted.

Definition at line 420 of file plot_window_subplot.hpp.

PlotFormat PlotWindowSubplot::plotFormat
protected

Plot format of the axes of the subplot.

Definition at line 428 of file plot_window_subplot.hpp.

PlotMode PlotWindowSubplot::plotMode
protected

Plot mode defining how the data points are to be plotted.

Definition at line 427 of file plot_window_subplot.hpp.

VariablesGrid* PlotWindowSubplot::plotVariablesGrid
protected

Discrete data to be plotted (time on x-axis, data on y-axis).

Definition at line 418 of file plot_window_subplot.hpp.

Expression* PlotWindowSubplot::plotVariableX
protected

Continuous variable on x-axis to be plotted.

Definition at line 416 of file plot_window_subplot.hpp.

Expression* PlotWindowSubplot::plotVariableY
protected

Continuous variable on y-axis to be plotted.

Definition at line 417 of file plot_window_subplot.hpp.

std::string PlotWindowSubplot::title
protected

Title of the subplot.

Definition at line 423 of file plot_window_subplot.hpp.

std::string PlotWindowSubplot::xLabel
protected

Label of x-axis of the subplot.

Definition at line 424 of file plot_window_subplot.hpp.

double PlotWindowSubplot::xRangeLowerLimit
protected

Lower limit of the x-axis.

Definition at line 430 of file plot_window_subplot.hpp.

double PlotWindowSubplot::xRangeUpperLimit
protected

Upper limit of the x-axis.

Definition at line 431 of file plot_window_subplot.hpp.

std::string PlotWindowSubplot::yLabel
protected

Label of y-axis of the subplot.

Definition at line 425 of file plot_window_subplot.hpp.

double PlotWindowSubplot::yRangeLowerLimit
protected

Lower limit of the y-axis.

Definition at line 432 of file plot_window_subplot.hpp.

double PlotWindowSubplot::yRangeUpperLimit
protected

Upper limit of the y-axis.

Definition at line 433 of file plot_window_subplot.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:26