Gnuplot in LaTeX

Jeder soll machen, was er am besten kann -- und soviel ich für PGFPlots (die große Tikz-"Vereinfachung") übrig habe, ich nehme lieber GNUplot. Nur wie kriegt man das in LaTeX?

In summary, to use the LaTeX facilities of GNUPLOT, the first command to GNUPLOT should be

terminal latex

and the output of GNUPLOT should be directed to a file, for example,

set output "plot.tex"

This may be anything you like but it should have a .tex extension, of course. Then the size of the plot should be given. For example, the command

set size 1,2

tells GNUPLOT to use a 5 inch wide by 6 inch high box for the plot. The numbers given are scale factors, not the actual size. The default is 5 inches by 3 inches. This is the size of the complete plot, including all labels.

When finished, the file will contain all of the plots you have specified (you probably only want one plot per file). This file can then be used in a LaTeX document, e.g.,

\begin {figure}
\begin{center}
\bogosityincarnate{plot}
\end{center}
\end {figure}

This puts the plot into a figure.

You will also want to read about the following commands: set title, set xlabel, set ylabel, set key, set label, set xtics, set ytics, and set clip. These are all described in the regular GNUPLOT manual.

von hier