Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
97dd10df
Commit
97dd10df
authored
Dec 19, 2018
by
Timo Koch
Browse files
[handbook][gnuplot] Improve wording, formatting
parent
4c6bc38a
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/handbook/4_externaltools.tex
View file @
97dd10df
...
...
@@ -32,16 +32,16 @@ The basic Git commands are:
\subsection
{
Gnuplot
}
\label
{
gnuplot
}
A gnuplot interface is available to plot or visualize results during a simulation run.
This is achieved with the help of the class provided in
\texttt
{
io/gnuplotinterface.hh
}
.
This is achieved with the help of the
\texttt
{
Dumux::GnuplotInterface
}
class provided in
\texttt
{
io/gnuplotinterface.hh
}
.
To use the gnuplot interface you have to make some modifications in your file, e.g., your main file.
First, you have to include the corresponding header file for the gnuplot interface.
First, you have to include the corresponding header file for the gnuplot interface.
\begin{lstlisting}
[style=DumuxCode]
#include <dumux/io/gnuplotinterface.hh
\end{lstlisting}
Second, you have to define an instance of the class GnuplotInterface (e.g. called
\texttt
{
gnuplot
}
).
Second, you have to define an instance of the class
\texttt
{
Dumux::
GnuplotInterface
}
(e.g. called
\texttt
{
gnuplot
}
).
\begin{lstlisting}
[style=DumuxCode]
Dumux::GnuplotInterface<double> gnuplot;
\end{lstlisting}
...
...
@@ -52,20 +52,20 @@ The actual plotting is done using the method of the gnuplot interface:
\begin{lstlisting}
[style=DumuxCode]
gnuplot.resetPlot(); // reset the plot
gnuplot.setXRange(0.0, 72000.0); // specify xmin and xmax
gnuplot.setXRange(0.0, 72000.0); // specify xmin and xmax
gnuplot.setYRange(0.0, 1.0); // specify ymin and ymax
gnuplot.setXlabel("time [s]"); // set xlabel
gnuplot.setYlabel("mole fraction mol/mol"); // set ylabel
// set x-values, y-values, the name of the data file and the Gnuplot options
gnuplot.addDataSetToPlot(x, y, "N2.dat", options);
gnuplot.addDataSetToPlot(x, y, "N2.dat", options);
gnuplot.plot("mole
_
fraction
_
N2"); // set the name of the output file
\end{lstlisting}
It is also possible to add several data sets to one plot by calling
\texttt
{
addDataSetToPlot()
}
more than once.
For more information have a look into a test including the gnuplot interface header file
or
the header file itself (
\texttt
{
dumux/io/gnuplotinterface.hh
}
).
For more information have a look into a test including the gnuplot interface header file
, the doxygen documentation
of
\texttt
{
Dumux::GnuplotInterface
}
, or
the header file itself (
\texttt
{
dumux/io/gnuplotinterface.hh
}
).
\subsection
{
Gstat
}
...
...
Timo Koch
@timok
mentioned in commit
a3a8f5dc
·
Dec 19, 2018
mentioned in commit
a3a8f5dc
mentioned in commit a3a8f5dc75b1d4ef3fa4703574898f1ab029099c
Toggle commit list
Timo Koch
@timok
mentioned in merge request
!1451 (merged)
·
Dec 19, 2018
mentioned in merge request
!1451 (merged)
mentioned in merge request !1451
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment