24#ifndef GNUPLOT_WRITER_H
25#define GNUPLOT_WRITER_H
46 explicit Gnuplot(std::string name);
47 Gnuplot(std::string name,
bool liveplot);
57 void setData(T xValue, T yValue, std::string name =
"", std::string key =
"",
char plotType =
'l');
59 void setData(
bool noXvalue, T yValue, std::string name =
"", std::string key =
"",
char plotType =
'l');
63 void setData(T xValue, std::vector<T> yValues, std::vector<std::string> names = {
""}, std::string key =
"right", std::vector<char> plotType = {
'l',
'l'});
65 void setData(
bool noXvalue, std::vector<T> yValues, std::vector<std::string> names = {
""}, std::string key =
"right",
const std::vector<char> plotType = {
'l',
'l'});
68 void setLabel(std::string xLabel =
"", std::string yLabel =
"");
71 void writePDF(std::string plotName =
"");
79 void writePNG(
int iT = -1,
double xRange = -1, std::string plotName =
"");
88 std::string _dataFile;
90 std::vector<std::string> _names;
92 std::string _preCommand;
102 std::vector<char> _plotTypes;
104 unsigned int _dataSize = 0;
109 static constexpr int _rank {0};
110 bool _gnuplotInstalled {
false};
113 void writePlotFile(std::string type, std::string plotName =
"");
117 void startGnuplot(std::string plotFile, std::string plotName =
"");
120 void linRegression(std::ofstream& fout, std::string x_axisType, std::string y_axisType);
void init()
initialises the data file
void startGnuplot(std::string plotFile, std::string plotName="")
system command to start gnuplot (LINUX ONLY!)
void setData(T xValue, T yValue, std::string name="", std::string key="", char plotType='l')
sets the data and plot file for two doubles (x and y) the plotType indicates whether the user want to...
void scaleAxes(std::ofstream &fout)
scales the axes if needed
Gnuplot(std::string name, bool liveplot, std::string preCommand, AxisType axisType, Regression regressionType)
type of Regression, off, LINear REGression, exponential Regression?,...
void writePNG(int iT=-1, double xRange=-1, std::string plotName="")
writes PNGs usage: first argument: numbering of png file (optional), second argument: range for the x...
Regression
different types of data usage and axes scaling
void linRegression(std::ofstream &fout, std::string x_axisType, std::string y_axisType)
creates the lin regression to the data
void writePDF(std::string plotName="")
writes an PDF
void setLabel(std::string xLabel="", std::string yLabel="")
set labels of the plot: xLabel and yLabel
Top level namespace for all of OpenLB.