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) |
PlotWindowSubplot * | getNext () 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) |
Expression * | getXPlotExpression () const |
VariableType | getXVariableType () const |
returnValue | getYLabel (std::string &_yLabel) |
Expression * | getYPlotExpression () const |
VariableType | getYVariableType () const |
PlotWindowSubplot & | operator= (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 |
PlotWindowSubplot * | next |
uint | nLines |
BooleanType | plot3D |
PlotName | plotEnum |
Expression * | plotExpressionX |
Expression * | plotExpressionY |
PlotFormat | plotFormat |
PlotMode | plotMode |
VariablesGrid * | plotVariablesGrid |
Expression * | plotVariableX |
Expression * | plotVariableY |
std::string | title |
std::string | xLabel |
double | xRangeLowerLimit |
double | xRangeUpperLimit |
std::string | yLabel |
double | yRangeLowerLimit |
double | yRangeUpperLimit |
Friends | |
class | GnuplotWindow |
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.
Definition at line 65 of file plot_window_subplot.hpp.
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.
[in] | _expression | Symbolic expression to be plotted on the y-axis. |
[in] | _title | Title of the subplot. |
[in] | _xLabel | Label of x-axis of the subplot. |
[in] | _yLabel | Label of y-axis of the subplot. |
[in] | _plotMode | Plot mode, see the PlotMode documentation for details. |
[in] | _xRangeLowerLimit | Lower limit of the x-axis. |
[in] | _xRangeUpperLimit | Upper limit of the x-axis. |
[in] | _yRangeLowerLimit | Lower limit of the y-axis. |
[in] | _yRangeUpperLimit | Upper 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.
[in] | _expressionX | Symbolic expression to be plotted on the x-axis. |
[in] | _expressionY | Symbolic expression to be plotted on the y-axis. |
[in] | _title | Title of the subplot. |
[in] | _xLabel | Label of x-axis of the subplot. |
[in] | _yLabel | Label of y-axis of the subplot. |
[in] | _plotMode | Plot mode, see the PlotMode documentation for details. |
[in] | _xRangeLowerLimit | Lower limit of the x-axis. |
[in] | _xRangeUpperLimit | Upper limit of the x-axis. |
[in] | _yRangeLowerLimit | Lower limit of the y-axis. |
[in] | _yRangeUpperLimit | Upper 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.
[in] | _name | Internal name of pre-defined information to be plotted. |
[in] | _title | Title of the subplot. |
[in] | _xLabel | Label of x-axis of the subplot. |
[in] | _yLabel | Label of y-axis of the subplot. |
[in] | _plotMode | Plot mode, see the PlotMode documentation for details. |
[in] | _xRangeLowerLimit | Lower limit of the x-axis. |
[in] | _xRangeUpperLimit | Upper limit of the x-axis. |
[in] | _yRangeLowerLimit | Lower limit of the y-axis. |
[in] | _yRangeUpperLimit | Upper 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.
[in] | _variable | Discrete data to be plotted on the y-axis. |
[in] | _title | Title of the subplot. |
[in] | _xLabel | Label of x-axis of the subplot. |
[in] | _yLabel | Label of y-axis of the subplot. |
[in] | _plotMode | Plot mode, see the PlotMode documentation for details. |
[in] | _xRangeLowerLimit | Lower limit of the x-axis. |
[in] | _xRangeUpperLimit | Upper limit of the x-axis. |
[in] | _yRangeLowerLimit | Lower limit of the y-axis. |
[in] | _yRangeUpperLimit | Upper 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.
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.
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.
Definition at line 481 of file plot_window_subplot.cpp.
|
inline |
Returns pointer to next SubPlotWindow within a PlotWindow.
|
inline |
Returns number of additional discrete data grids of the subplot.
|
inline |
Returns number of additional horizontal lines of the subplot.
|
inline |
Returns name of pre-defined information to be plotted in the subplot.
|
inline |
Returns current plot format of the subplot.
|
inline |
Returns current plot mode of the subplot.
|
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.
|
inline |
Returns internal type of the subplot.
|
inline |
Returns current title of the subplot.
@param[out] _title Current title.
|
inline |
Returns current label of x-axis of the subplot.
@param[out] _xLabel Current label of x-axis.
|
inline |
Returns pointer to the expression on the x-axis of the subplot.
|
inline |
Returns type of the variable on the x-axis of the subplot.
|
inline |
Returns current label of y-axis of the subplot.
@param[out] _yLabel Current label of y-axis.
|
inline |
Returns pointer to the expression on the y-axis of the subplot.
|
inline |
Returns type of the variable on the y-axis of the subplot.
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.
|
inline |
Assigns pointer to next SubPlotWindow within a PlotWindow.
@param[in] _next New pointer to next item.
|
inline |
Sets plot format of the axes of the subplot.
@param[in] _plotFormat New plot format, see the PlotFormat documentation for details.
|
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.
|
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.
|
inline |
Sets title of the subplot.
@param[in] _title New title.
|
inline |
Sets label of x-axis of the subplot.
@param[in] _xLabel New label of x-axis.
|
inline |
Sets label of y-axis of the subplot.
@param[in] _yLabel New label of y-axis.
|
friend |
Definition at line 67 of file plot_window_subplot.hpp.
|
protected |
Values of additional discrete data points to be plotted.
Definition at line 441 of file plot_window_subplot.hpp.
|
protected |
Values of additional horizontal lines to be plotted.
Definition at line 438 of file plot_window_subplot.hpp.
|
protected |
Number of additional discrete data points to be plotted.
Definition at line 440 of file plot_window_subplot.hpp.
|
protected |
Pointer to next subplot within a PlotWindow.
Definition at line 443 of file plot_window_subplot.hpp.
|
protected |
Number of additional horizontal lines to be plotted.
Definition at line 437 of file plot_window_subplot.hpp.
|
protected |
Flag indicating whether data is to be plotted in 3D.
Definition at line 435 of file plot_window_subplot.hpp.
|
protected |
Pre-defined information to be plotted (on y-axis).
Definition at line 421 of file plot_window_subplot.hpp.
|
protected |
Continuous expression on x-axis to be plotted.
Definition at line 419 of file plot_window_subplot.hpp.
|
protected |
Continuous expression on x-axis to be plotted.
Definition at line 420 of file plot_window_subplot.hpp.
|
protected |
Plot format of the axes of the subplot.
Definition at line 428 of file plot_window_subplot.hpp.
|
protected |
Plot mode defining how the data points are to be plotted.
Definition at line 427 of file plot_window_subplot.hpp.
|
protected |
Discrete data to be plotted (time on x-axis, data on y-axis).
Definition at line 418 of file plot_window_subplot.hpp.
|
protected |
Continuous variable on x-axis to be plotted.
Definition at line 416 of file plot_window_subplot.hpp.
|
protected |
Continuous variable on y-axis to be plotted.
Definition at line 417 of file plot_window_subplot.hpp.
|
protected |
Title of the subplot.
Definition at line 423 of file plot_window_subplot.hpp.
|
protected |
Label of x-axis of the subplot.
Definition at line 424 of file plot_window_subplot.hpp.
|
protected |
Lower limit of the x-axis.
Definition at line 430 of file plot_window_subplot.hpp.
|
protected |
Upper limit of the x-axis.
Definition at line 431 of file plot_window_subplot.hpp.
|
protected |
Label of y-axis of the subplot.
Definition at line 425 of file plot_window_subplot.hpp.
|
protected |
Lower limit of the y-axis.
Definition at line 432 of file plot_window_subplot.hpp.
|
protected |
Upper limit of the y-axis.
Definition at line 433 of file plot_window_subplot.hpp.