32 class HERMES_API
Graph :
public Hermes::Mixins::Loggable
36 Graph(
const char* title =
nullptr,
const char* x_axis_name =
nullptr,
const char* y_axis_name =
nullptr);
38 void set_captions(
const char* title =
nullptr,
const char* x_axis_name =
nullptr,
const char* y_axis_name =
nullptr);
40 void set_log_x(
bool log =
true);
41 void set_log_y(
bool log =
true);
43 void show_legend(
bool show =
true);
44 void show_grid(
bool show =
true);
46 int add_row(
const char*
name =
nullptr,
const char* color =
"k",
const char* line =
"-",
const char* marker =
"");
47 void set_row_style(
int row,
const char* color =
"k",
const char* line =
"-",
const char* marker =
"");
49 void add_values(
int row,
double x,
double y);
51 void add_values(
double x,
double y);
52 void add_values(
int row,
int n,
double* x,
double* y);
53 void add_values(
int row,
int n, double2* xy);
55 virtual void save(
const char* filename) = 0;
56 void save_numbered(
const char* filename,
int number);
61 bool logx, logy, legend, grid;
71 std::vector<Values> data;
74 std::vector<Row> rows;
83 SimpleGraph(
const char* title =
nullptr,
const char* x_axis_name =
nullptr,
const char* y_axis_name =
nullptr)
84 :
Graph(title, x_axis_name, y_axis_name) {}
86 virtual void save(
const char* filename);
95 MatlabGraph(
const char* title =
nullptr,
const char* x_axis_name =
nullptr,
const char* y_axis_name =
nullptr)
96 :
Graph(title, x_axis_name, y_axis_name) {}
98 virtual void save(
const char* filename);
104 static const char* default_terminal =
"set terminal postscript eps enhanced\n";
110 GnuplotGraph(
const char* title =
nullptr,
const char* x_axis_name =
nullptr,
const
111 char* y_axis_name =
nullptr,
double lines_width = 1.0,
const
113 Graph(title, x_axis_name, y_axis_name),
115 terminal_str(terminal_str),
119 virtual void save(
const char* filename);
123 void set_legend_pos(
const char* posspec);
146 PNGGraph(
const char* title =
nullptr,
const char* x_axis_name =
nullptr,
const char* y_axis_name =
nullptr,
147 double lines_width = 1.0,
double plot_width = 800,
double plot_height = 600);
Common definitions for Hermes2D.
::xsd::cxx::tree::name< char, token > name
C++ type corresponding to the Name XML Schema built-in type.
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.