Hermes2D  3.0
Hermes::Hermes2D::Graph Class Referenceabstract

#include <graph.h>

+ Inheritance diagram for Hermes::Hermes2D::Graph:

Classes

struct  Row
 
struct  Values
 

Public Member Functions

 Graph (const char *title=nullptr, const char *x_axis_name=nullptr, const char *y_axis_name=nullptr)
 
void set_captions (const char *title=nullptr, const char *x_axis_name=nullptr, const char *y_axis_name=nullptr)
 
void set_log_x (bool log=true)
 
void set_log_y (bool log=true)
 
void show_legend (bool show=true)
 
void show_grid (bool show=true)
 
int add_row (const char *name=nullptr, const char *color="k", const char *line="-", const char *marker="")
 
void set_row_style (int row, const char *color="k", const char *line="-", const char *marker="")
 
void add_values (int row, double x, double y)
 
void add_values (double x, double y)
 
void add_values (int row, int n, double *x, double *y)
 
void add_values (int row, int n, double2 *xy)
 
virtual void save (const char *filename)=0
 
void save_numbered (const char *filename, int number)
 

Protected Attributes

std::string title
 
std::string xname
 
std::string yname
 
bool logx
 
bool logy
 
bool legend
 
bool grid
 
std::vector< Rowrows
 

Detailed Description

Graph is a utility class storing a simple XY graph (eg., a convergence graph). One or more data rows can be defined by calling add_row(). The actual data are added to the rows by calling add_values(). The resulting graph is saved to a file by calling save().

Please note that this is a base class that cannot be instantiated. Use MatlabGraph, GnuplotGraph or SimpleGraph instead.

Definition at line 32 of file graph.h.


The documentation for this class was generated from the following files: