plot_window_subplot.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
27 
34 #ifndef ACADO_TOOLKIT_PLOT_WINDOW_SUBPLOT_HPP
35 #define ACADO_TOOLKIT_PLOT_WINDOW_SUBPLOT_HPP
36 
37 
41 
43 
44 class Curve;
45 
66 {
67  friend class GnuplotWindow;
68 
69  //
70  // PUBLIC MEMBER FUNCTIONS:
71  //
72  public:
75 
89  PlotWindowSubplot( const Expression& _expression,
90  const char* const _title = "",
91  const char* const _xLabel = "",
92  const char* const _yLabel = "",
93  PlotMode _plotMode = PM_UNKNOWN,
94  double _xRangeLowerLimit = INFTY,
95  double _xRangeUpperLimit = INFTY,
96  double _yRangeLowerLimit = INFTY,
97  double _yRangeUpperLimit = INFTY
98  );
99 
114  PlotWindowSubplot( const Expression& _expressionX,
115  const Expression& _expressionY,
116  const char* const _title = "",
117  const char* const _xLabel = "",
118  const char* const _yLabel = "",
119  PlotMode _plotMode = PM_UNKNOWN,
120  double _xRangeLowerLimit = INFTY,
121  double _xRangeUpperLimit = INFTY,
122  double _yRangeLowerLimit = INFTY,
123  double _yRangeUpperLimit = INFTY
124  );
125 
140  const char* const _title = "",
141  const char* const _xLabel = "",
142  const char* const _yLabel = "",
143  PlotMode _plotMode = PM_UNKNOWN,
144  double _xRangeLowerLimit = INFTY,
145  double _xRangeUpperLimit = INFTY,
146  double _yRangeLowerLimit = INFTY,
147  double _yRangeUpperLimit = INFTY
148  );
149 
163  PlotWindowSubplot( const VariablesGrid& _plotVariable,
164  const char* const _title = "",
165  const char* const _xLabel = "",
166  const char* const _yLabel = "",
167  PlotMode _plotMode = PM_UNKNOWN,
168  double _xRangeLowerLimit = INFTY,
169  double _xRangeUpperLimit = INFTY,
170  double _yRangeLowerLimit = INFTY,
171  double _yRangeUpperLimit = INFTY,
172  BooleanType _plot3D = BT_FALSE
173  );
174 
176  PlotWindowSubplot( const Curve& _curve,
177  double _xRangeLowerLimit = 0.0,
178  double _xRangeUpperLimit = 1.0,
179  const char* const _title = "",
180  const char* const _xLabel = "",
181  const char* const _yLabel = "",
182  PlotMode _plotMode = PM_UNKNOWN,
183  double _yRangeLowerLimit = INFTY,
184  double _yRangeUpperLimit = INFTY
185  );
186 
192  );
193 
196 
202  );
203 
204 
211  inline returnValue setTitle( const std::string& _title
212  );
213 
220  inline returnValue setXLabel( const std::string& _xLabel
221  );
222 
229  inline returnValue setYLabel( const std::string& _yLabel
230  );
231 
238  inline returnValue setPlotMode( PlotMode _plotMode
239  );
240 
247  inline returnValue setPlotFormat( PlotFormat _plotFormat
248  );
249 
260  inline returnValue setRanges( double _xRangeLowerLimit,
261  double _xRangeUpperLimit,
262  double _yRangeLowerLimit,
263  double _yRangeUpperLimit
264  );
265 
272  returnValue addLine( double _lineValue
273  );
274 
281  returnValue addData( const VariablesGrid& _newData
282  );
283 
284 
291  inline returnValue getTitle( std::string& _title
292  );
293 
300  inline returnValue getXLabel( std::string& _xLabel
301  );
302 
309  inline returnValue getYLabel( std::string& _yLabel
310  );
311 
316  inline PlotMode getPlotMode( ) const;
317 
322  inline PlotFormat getPlotFormat( ) const;
323 
333  inline returnValue getRanges( double& _xRangeLowerLimit,
334  double& _xRangeUpperLimit,
335  double& _yRangeLowerLimit,
336  double& _yRangeUpperLimit
337  ) const;
338 
343  inline uint getNumLines( ) const;
344 
349  inline uint getNumData( ) const;
350 
351 
356  inline SubPlotType getSubPlotType( ) const;
357 
362  inline VariableType getXVariableType( ) const;
363 
368  inline VariableType getYVariableType( ) const;
369 
374  inline Expression* getXPlotExpression( ) const;
375 
380  inline Expression* getYPlotExpression( ) const;
381 
386  inline PlotName getPlotEnum( ) const;
387 
388 
395  inline returnValue setNext( PlotWindowSubplot* const _next
396  );
397 
402  inline PlotWindowSubplot* getNext( ) const;
403 
404 
405  //
406  // PROTECTED MEMBER FUNCTIONS:
407  //
408  protected:
409 
410 
411  //
412  // DATA MEMBERS:
413  //
414  protected:
415 
423  std::string title;
424  std::string xLabel;
425  std::string yLabel;
438  double* lineValues;
444 };
445 
446 
448 
449 
450 
451 #include <acado/user_interaction/plot_window_subplot.ipp>
452 
453 
454 #endif // ACADO_TOOLKIT_PLOT_WINDOW_SUBPLOT_HPP
455 
456 
457 /*
458  * end of file
459  */
returnValue setXLabel(const std::string &_xLabel)
uint getNumLines() const
returnValue addData(const VariablesGrid &_newData)
returnValue setYLabel(const std::string &_yLabel)
PlotWindowSubplot * getNext() const
const double INFTY
PlotWindowSubplot & operator=(const PlotWindowSubplot &rhs)
PlotMode
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
PlotMode getPlotMode() const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
VariablesGrid * plotVariablesGrid
returnValue setTitle(const std::string &_title)
returnValue getYLabel(std::string &_yLabel)
#define CLOSE_NAMESPACE_ACADO
Expression * getXPlotExpression() const
VariableType
Definition: acado_types.hpp:95
Base class for all variables within the symbolic expressions family.
Definition: expression.hpp:56
returnValue addLine(double _lineValue)
PlotName
uint getNumData() const
returnValue setRanges(double _xRangeLowerLimit, double _xRangeUpperLimit, double _yRangeLowerLimit, double _yRangeUpperLimit)
PlotFormat
returnValue getRanges(double &_xRangeLowerLimit, double &_xRangeUpperLimit, double &_yRangeLowerLimit, double &_yRangeUpperLimit) const
PlotWindowSubplot * next
returnValue setPlotMode(PlotMode _plotMode)
Allows to work with piecewise-continous function defined over a scalar time interval.
Definition: curve.hpp:52
returnValue getXLabel(std::string &_xLabel)
void rhs(const real_t *x, real_t *f)
VariableType getYVariableType() const
Allows to manage sub-windows of user-specified plot windows for algorithmic outputs (for internal use...
returnValue setNext(PlotWindowSubplot *const _next)
SubPlotType
Expression * getYPlotExpression() const
SubPlotType getSubPlotType() const
#define BEGIN_NAMESPACE_ACADO
returnValue getTitle(std::string &_title)
#define BT_FALSE
Definition: acado_types.hpp:49
PlotFormat getPlotFormat() const
returnValue setPlotFormat(PlotFormat _plotFormat)
Provides an interface to Gnuplot for plotting algorithmic outputs.
PlotName getPlotEnum() const
VariableType getXVariableType() const


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