Loading...
Searching...
No Matches
roboptim::visualization::Gnuplot Class Reference

Gnuplot script. More...

#include <roboptim/core/visualization/gnuplot.hh>

Public Member Functions

 ~Gnuplot ()
 
void push_command (gnuplot::Command cmd)
 Add a new Gnuplot command to the script. More...
 
std::ostream & print (std::ostream &) const
 Display the Gnuplot script on the specified output stream. More...
 
Gnuplotoperator<< (gnuplot::Command)
 
void clear ()
 Clear the vector of commands. More...
 

Static Public Member Functions

static Gnuplot make_gnuplot (bool with_header=true)
 Instanciate a Gnuplot without setting a term. More...
 
static Gnuplot make_interactive_gnuplot (bool with_header=true)
 Instanciate a Gnuplot suitable for interactive use. More...
 

Protected Member Functions

 Gnuplot (bool with_header=true)
 Default constructor can not be called directly. More...
 

Detailed Description

Gnuplot script.

This class gathers Gnuplot commands to build a complete Gnuplot script. Gnuplot 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-gnuplot-function.cc, and visualization-gnuplot-simple.cc.

Constructor & Destructor Documentation

◆ ~Gnuplot()

roboptim::visualization::Gnuplot::~Gnuplot ( )

◆ Gnuplot()

roboptim::visualization::Gnuplot::Gnuplot ( 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 push_command().

Member Function Documentation

◆ clear()

void roboptim::visualization::Gnuplot::clear ( )

Clear the vector of commands.

Examples
visualization-gnuplot-simple.cc.

◆ make_gnuplot()

static Gnuplot roboptim::visualization::Gnuplot::make_gnuplot ( bool  with_header = true)
inlinestatic

Instanciate a Gnuplot without setting a term.

Parameters
with_headerwhether to print the header or not
Returns
Gnuplot instance

◆ make_interactive_gnuplot()

static Gnuplot roboptim::visualization::Gnuplot::make_interactive_gnuplot ( bool  with_header = true)
inlinestatic

Instanciate a Gnuplot suitable for interactive use.

This initializes a persistent Gnuplot instance which is suitable for user interaction.

Parameters
with_headerwhether to print the header or not
Returns
Gnuplot instance

References push_command().

◆ operator<<()

Gnuplot & roboptim::visualization::Gnuplot::operator<< ( gnuplot::Command  cmd)

References push_command().

◆ print()

std::ostream & roboptim::visualization::Gnuplot::print ( std::ostream &  o) const

Display the Gnuplot script on the specified output stream.

Parameters
ooutput stream used for display
Returns
output stream

Referenced by roboptim::visualization::operator<<().

◆ push_command()

void roboptim::visualization::Gnuplot::push_command ( gnuplot::Command  cmd)

Add a new Gnuplot command to the script.

Parameters
cmdcommand that will be pushed

Referenced by Gnuplot(), make_interactive_gnuplot(), roboptim::visualization::operator<<(), and operator<<().