Interface for passing data sets to a file and plotting them, if gnuplot is installed.
#include <dumux/io/gnuplotinterface.hh>
Public Types | |
| enum class | CurveType { function , file , data } |
| using | StringVector = std::vector< std::string > |
| using | CurveTypeVector = std::vector< CurveType > |
Public Member Functions | |
| GnuplotInterface (bool persist=true) | |
| The constructor. More... | |
| ~GnuplotInterface () | |
| The destructor. More... | |
| void | plot (const std::string &filename="") |
| Plots the files for a specific window number, writes a gnuplot and png file. More... | |
| void | resetAll (const bool persist=true) |
| Resets all gnuplot parameters. More... | |
| void | resetPlot () |
| Deletes all plots from a plotting window and resets user-defined options. More... | |
| void | open (const bool persist=true) |
| Opens gnuplot. More... | |
| void | close () |
| Closes gnuplot. More... | |
| void | addFunctionToPlot (const std::string &function, const std::string &options="with lines") |
| Adds a function to list of plots. More... | |
| void | addFileToPlot (const std::string &fileName, const std::string &options="with lines") |
| Adds a file to list of plots. More... | |
| template<class DataX , class DataY > | |
| void | addDataSetToPlot (const DataX &x, const DataY &y, const std::string &fileName, const std::string &options="with lines") |
| Adds a data set and writes a data file. More... | |
| void | setXlabel (const std::string &label) |
| Sets the label for the x-axis. More... | |
| void | setYlabel (const std::string &label) |
| Sets the label for the y-axis. More... | |
| void | setXRange (Scalar min, Scalar max) |
| Sets the range for the x-axis. More... | |
| void | setYRange (Scalar min, Scalar max) |
| Sets the range for the y-axis. More... | |
| void | setOption (const std::string &option) |
| Sets additional user-defined options. More... | |
| void | setOpenPlotWindow (bool openPlotWindow) |
| Define whether the gnuplot window should be opened. More... | |
| void | setCreateImage (bool createImage) |
| Define whether gnuplot should create .png files. More... | |
| void | setDatafileSeparator (char separator) |
| Sets the datafile separator. More... | |
| void | setTerminalType (std::string terminal) |
| Sets the terminal used for interactive output. More... | |
| void | setOutputDirectory (const std::string &outputDirectory) |
| Sets the output directory for data and gnuplot files. More... | |
| void | useDashedLines (bool dashed) |
| Use dashed (true) or solid (false) lines. More... | |
| using Dumux::GnuplotInterface< Scalar >::CurveTypeVector = std::vector<CurveType> |
| using Dumux::GnuplotInterface< Scalar >::StringVector = std::vector<std::string> |
|
strong |
|
inlineexplicit |
|
inline |
|
inline |
The title of the plot can be changed by setting the title in the options
| x | Vector containing the x-axis data points |
| y | Vector containing the y-axis data points |
| fileName | The name of the written data file |
| options | Specific gnuplot options passed to this plot |
|
inline |
| fileName | Name and path of the file to be plotted |
| options | Specific gnuplot options passed to this plot |
|
inline |
| function | Function to be plotted |
| options | Specific gnuplot options passed to this plot |
|
inline |
|
inline |
|
inline |
| filename | The name of the output file |
|
inline |
|
inline |
|
inline |
| createImage | Create an image or not |
|
inline |
| separator | The separator sign between two data columns |
|
inline |
| openPlotWindow | Open gnuplot or not |
|
inline |
| option | Additional line of option in gnuplot language |
|
inline |
| outputDirectory | The user-specified terminal |
|
inline |
| terminal | The user-specified terminal |
|
inline |
| label | The label of the x-axis |
|
inline |
| min | The lowest plotted value for the x-axis |
| max | The highest plotted value for the x-axis |
|
inline |
| label | The label of the y-axis |
|
inline |
| min | The lowest plotted value for the y-axis |
| max | The highest plotted value for the y-axis |
|
inline |
| dashed | Use dashed lines |