Gnuplot Class Reference

#include <Gnuplot.hh>

List of all members.

Public Member Functions

void cmd (const char *_cmd,...)
 Send a command to gnuplot (low-level function use by all plot functions.).
bool is_active (void) const
 Is Self active, i.e. does it have an active plot?
bool is_valid (void) const
 Is Self valid?
 ~Gnuplot ()
Constructors

 Gnuplot (const string &_title, const string &_style, const string &_xlabel, const string &_ylabel, vector< double > _x)
 Constructor calling plot_x().
 Gnuplot (const string &_title, const string &_style, const string &_xlabel, const string &_ylabel, vector< double > _x, vector< double > _y)
 Constructor calling plot_xy().
 Gnuplot (const string &_style)
 Set a style during construction.
 Gnuplot ()
 Default constructor.
plot functions

void plot_equation (const string &_equation, const string &_title)
 Plot an equation supplied as a string.
void plot_slope (double _a, double _b, const string &_title)
void plot_x (vector< double > _x, const string &_title)
 Plot a single vector.
void plot_xy (vector< double > _x, vector< double > _y, const string &_title)
 Plot x,y pairs.
void reset_plot (void)
 If multiple plots are present it will clear the plot area.
Gnuplot settings

void set_style (const string &_style)
 set line style
void set_xlabel (const string &_xlabel)
 set x axis label
void set_ylabel (const string &_ylabel)
 set x axis label

Private Member Functions

bool get_program_path (const string)
void init ()

Private Attributes

FILE * gnucmd
int nplots
string pstyle
vector< string > to_delete
bool valid

Static Private Attributes

static string gnuplot_executable_

Detailed Description

Utility class interfacing with Gnuplot.

Note:
The plot will be visible as long as the object is not destructed.
Author:
Rajarshi Guha (C++ API based on the C API by Nicolas Devillard)
See also:
http://ndevilla.free.fr/gnuplot/ more information.

Definition at line 92 of file Gnuplot.hh.


Constructor & Destructor Documentation

Gnuplot::Gnuplot (  ) 

Default constructor.

Gnuplot::Gnuplot ( const string &  _style  ) 

Set a style during construction.

Gnuplot::Gnuplot ( const string &  _title,
const string &  _style,
const string &  _xlabel,
const string &  _ylabel,
vector< double >  _x,
vector< double >  _y 
)

Constructor calling plot_xy().

Gnuplot::Gnuplot ( const string &  _title,
const string &  _style,
const string &  _xlabel,
const string &  _ylabel,
vector< double >  _x 
)

Constructor calling plot_x().

Gnuplot::~Gnuplot (  ) 

Member Function Documentation

void Gnuplot::cmd ( const char *  _cmd,
  ... 
)

Send a command to gnuplot (low-level function use by all plot functions.).

bool Gnuplot::get_program_path ( const   string  )  [private]
void Gnuplot::init (  )  [private]
bool Gnuplot::is_active ( void   )  const [inline]

Is Self active, i.e. does it have an active plot?

Definition at line 177 of file Gnuplot.hh.

bool Gnuplot::is_valid ( void   )  const [inline]

Is Self valid?

Definition at line 174 of file Gnuplot.hh.

void Gnuplot::plot_equation ( const string &  _equation,
const string &  _title 
)

Plot an equation supplied as a string.

void Gnuplot::plot_slope ( double  _a,
double  _b,
const string &  _title 
)

Plot an equation of the form: y = ax + b You supply a and b

void Gnuplot::plot_x ( vector< double >  _x,
const string &  _title 
)

Plot a single vector.

void Gnuplot::plot_xy ( vector< double >  _x,
vector< double >  _y,
const string &  _title 
)

Plot x,y pairs.

void Gnuplot::reset_plot ( void   ) 

If multiple plots are present it will clear the plot area.

void Gnuplot::set_style ( const string &  _style  ) 

set line style

void Gnuplot::set_xlabel ( const string &  _xlabel  ) 

set x axis label

void Gnuplot::set_ylabel ( const string &  _ylabel  ) 

set x axis label


Member Data Documentation

FILE* Gnuplot::gnucmd [private]

Definition at line 96 of file Gnuplot.hh.

string Gnuplot::gnuplot_executable_ [static, private]

Definition at line 104 of file Gnuplot.hh.

int Gnuplot::nplots [private]

Definition at line 99 of file Gnuplot.hh.

string Gnuplot::pstyle [private]

Definition at line 97 of file Gnuplot.hh.

vector<string> Gnuplot::to_delete [private]

Definition at line 98 of file Gnuplot.hh.

bool Gnuplot::valid [private]

Definition at line 101 of file Gnuplot.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


openmesh
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 11 12:11:11 2013