ROBOOP, A Robotics Object Oriented Package in C++
Plot_file Class Reference

Creates a graphic from a data file. More...

#include <gnugraph.h>

Inheritance diagram for Plot_file:
IO_matrix_file Plot2d

Public Member Functions

 Plot_file (const std::string &filename)
 Constructor. More...
 
short graph (const std::string &title_graph, const std::string &label, const short x, const short y, const short x_start, const short y_start, const short y_end)
 Creates a graphic.
 
- Public Member Functions inherited from IO_matrix_file
 IO_matrix_file (const std::string &filename)
 Constructor.
 
short write (const std::vector< Matrix > &data)
 
short write (const std::vector< Matrix > &data, const std::vector< std::string > &title)
 
short read (std::vector< Matrix > &data)
 
short read (std::vector< Matrix > &data, std::vector< std::string > &title)
 
short read_all (std::vector< Matrix > &data, std::vector< std::string > &data_title)
 Reads all sequences of data. More...
 

Private Attributes

std::vector< Matrix > data_from_file
 Data file.
 
std::vector< std::string > data_title
 Data file title.
 

Additional Inherited Members

- Private Member Functions inherited from Plot2d
 Plot2d (void)
 Constructor.
 
void dump (void)
 Method to dump the content of Plot2d to stdout.
 
void settitle (const std::string &t)
 Set the title.
 
void setxlabel (const std::string &t)
 Set the x axis name.
 
void setylabel (const std::string &t)
 Set the y axis name.
 
void addcurve (const Matrix &data, const std::string &label="", LineType_en enLineType=DATAPOINTS)
 Add a curve on the graphic.
 
void gnuplot (void)
 Creates a GNUplot graphic.
 
void addcommand (const std::string &gcom)
 Add GNUplot command.
 

Detailed Description

Creates a graphic from a data file.

Definition at line 219 of file gnugraph.h.

Constructor & Destructor Documentation

Plot_file::Plot_file ( const std::string &  filename)

Constructor.

Reads all the data of the file filename.

Definition at line 692 of file gnugraph.cpp.

References data_from_file, and IO_matrix_file::read_all().