matplotlib script
More...
#include <roboptim/core/visualization/matplotlib.hh>
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.
- Examples:
- visualization-matplotlib-function.cc, and visualization-matplotlib-simple.cc.
roboptim::visualization::Matplotlib::~Matplotlib |
( |
| ) |
|
roboptim::visualization::Matplotlib::Matplotlib |
( |
std::pair< int, int > |
multiplot = std::make_pair(1, 1) , |
|
|
bool |
with_header = true |
|
) |
| |
|
explicitprotected |
Default constructor can not be called directly.
Use of the named constructor (see static methods) to instantiate this class.
References resetImports().
void roboptim::visualization::Matplotlib::clear |
( |
| ) |
|
static Matplotlib roboptim::visualization::Matplotlib::make_matplotlib |
( |
std::pair< int, int > |
multiplot = std::make_pair(1, 1) , |
|
|
bool |
with_header = true |
|
) |
| |
|
inlinestatic |
Instanciate a matplotlib without setting a term.
- Parameters
-
with_header | whether to print the header or not |
- Returns
- matplotlib instance
std::pair< int, int > & roboptim::visualization::Matplotlib::multiplot |
( |
| ) |
|
Plots layout.
{1,1} if unspecified.
- Returns
- Reference to multiplot_
Referenced by print().
std::pair< int, int > roboptim::visualization::Matplotlib::multiplot |
( |
| ) |
const |
Plots layout. {1,1} if unspecified.
std::ostream & roboptim::visualization::Matplotlib::print |
( |
std::ostream & |
o | ) |
const |
void roboptim::visualization::Matplotlib::push_import |
( |
const matplotlib::Import & |
import | ) |
|
Add a new Python import to the script.
- Parameters
-
Referenced by operator<<().
void roboptim::visualization::Matplotlib::resetImports |
( |
| ) |
|
|
protected |
bool & roboptim::visualization::Matplotlib::withHeader |
( |
| ) |
|
Whether to print the header (imports).
- Returns
- Reference to withHeader_.
Referenced by print().
bool roboptim::visualization::Matplotlib::withHeader |
( |
| ) |
const |
Whether to print the header (imports).