matplotlib script More...
#include <roboptim/core/visualization/matplotlib.hh>
Public Member Functions | |
~Matplotlib () | |
void | push_command (const matplotlib::Command &cmd) |
Add a new matplotlib command to the script. | |
void | push_import (const matplotlib::Import &import) |
Add a new Python import to the script. | |
std::ostream & | print (std::ostream &) const |
Display the matplotlib script on the specified output stream. | |
Matplotlib & | operator<< (matplotlib::Command) |
Matplotlib & | operator<< (matplotlib::Import) |
void | clear () |
Clear the vectors of imports and commands. | |
bool & | withHeader () |
Whether to print the header (imports). | |
bool | withHeader () const |
Whether to print the header (imports). | |
Static Public Member Functions | |
static Matplotlib | make_matplotlib (bool with_header=true) |
Instanciate a matplotlib without setting a term. | |
Protected Member Functions | |
Matplotlib (bool with_header=true) | |
Default constructor can not be called directly. | |
void | resetImports () |
Reset imports to initial values. |
matplotlib script
This class gathers matplotlib commands to build a complete matplotlib script. matplotlib commands can be inserted through this object through the <<
operator and this object can be put into an output stream using the <<
operator.
roboptim::visualization::Matplotlib::Matplotlib | ( | bool | with_header = true | ) | [explicit, protected] |
Default constructor can not be called directly.
Use of the named constructor (see static methods) to instantiate this class.
References resetImports().
Clear the vectors of imports and commands.
References resetImports().
static Matplotlib roboptim::visualization::Matplotlib::make_matplotlib | ( | bool | with_header = true | ) | [inline, static] |
Instanciate a matplotlib without setting a term.
with_header | whether to print the header or not |
Matplotlib & roboptim::visualization::Matplotlib::operator<< | ( | matplotlib::Command | cmd | ) |
References push_command().
Matplotlib & roboptim::visualization::Matplotlib::operator<< | ( | matplotlib::Import | import | ) |
References push_import().
std::ostream & roboptim::visualization::Matplotlib::print | ( | std::ostream & | o | ) | const |
Display the matplotlib script on the specified output stream.
o | output stream used for display |
Referenced by roboptim::visualization::operator<<().
void roboptim::visualization::Matplotlib::push_command | ( | const matplotlib::Command & | cmd | ) |
Add a new matplotlib command to the script.
cmd | command that will be pushed |
Referenced by operator<<(), and roboptim::visualization::operator<<().
void roboptim::visualization::Matplotlib::push_import | ( | const matplotlib::Import & | import | ) |
Add a new Python import to the script.
import | package to import |
Referenced by operator<<().
void roboptim::visualization::Matplotlib::resetImports | ( | ) | [protected] |
Reset imports to initial values.
Referenced by clear(), and Matplotlib().
Whether to print the header (imports).
bool roboptim::visualization::Matplotlib::withHeader | ( | ) | const |
Whether to print the header (imports).