9 namespace GridRefinement {
15 template <
typename real>
28 explicit GnuFig(
const std::string &name_input);
32 const std::string &name_input);
36 const std::string &title_input);
40 const std::string &xlabel_input);
44 const std::string &ylabel_input);
48 const bool grid_bool_input);
52 const bool xlog_bool_input);
56 const bool ylog_bool_input);
60 const bool legend_bool_input);
64 const std::vector<real> &x_data,
65 const std::vector<real> &y_data);
69 const std::vector<real> &x_data,
70 const std::vector<real> &y_data,
71 const std::string & label_name);
99 const unsigned int data_id);
135 #endif // __GNU_OUT_H__ void set_y_scale_log(const bool ylog_bool_input)
Set flag for logarithmic y-axis.
const std::string DEFAULT_NAME
Default file name (no extension)
bool ylog
Flag for enabling y-axis logarithimic scale.
bool grid
Flag for enabling grid line visibility.
GnuFig()
Constructor with no name specified.
const std::string DEFAULT_TITLE
Default figure title.
void set_x_label(const std::string &xlabel_input)
Sets the x-axis label.
bool legend
Flag for enabling legend visibility.
void set_y_label(const std::string &ylabel_input)
Sets the y-axis label.
const std::string DEFAULT_YLABEL
deafult figure y-axis label
std::string ylabel
Figure y-axis label.
void set_name(const std::string &name_input)
Sets the file output name (without extension)
std::string title
Figure title.
const bool DEFAULT_XLOG
Default flag for enabling x-axis logarithimic scale.
void set_legend(const bool legend_bool_input)
Sets display visibility of figure legend.
Files for the baseline physics.
void write_gnuplot_header(std::ostream &out)
Write the figure formatting header based on settings.
const bool DEFAULT_YLOG
Default flag for enabling y-axis logarithimic sclae.
const std::string DEFAULT_XLABEL
default figure x-axis label
void add_xy_data(const std::vector< real > &x_data, const std::vector< real > &y_data)
Adds 2D x vs. y data to be plotted (default legend label)
std::string name
File name (no extension)
void write_xy_data(std::ostream &out, const unsigned int data_id)
Write the i^th data entry to .dat file.
void exec_gnuplot()
Executes the gnuplot file.
const std::string DEFAULT_LABEL_PREFIX
Default legend data name prefix (followed by data_id)
std::vector< std::vector< real > > y_data_vec
Data entries y-component.
std::vector< std::string > label_name_vec
Data entries label names.
std::string xlabel
Figure x-axis label.
void write_gnuplot()
Main write function call.
const bool DEFAULT_GRID
Default flag for enabling grid line visibility.
std::vector< std::vector< real > > x_data_vec
Data entries x-component.
bool xlog
Flag for enabling x-axis logarithimic scale.
void set_grid(const bool grid_bool_input)
Set flag for enabling background grid.
void write_gnuplot_footer(std::ostream &out)
Writes the figure footer.
void set_x_scale_log(const bool xlog_bool_input)
Set flag for logarithmic x-axis.
const bool DEFAULT_LEGEND
Default flag for enabling legend visibility.
void set_title(const std::string &title_input)
Sets the figure title.
void write_gnuplot_body(std::ostream &out)
Writes the figure body including performing data outputs.