I have installed gnuplot 4.4rc1 and made a simple plot to the epslatex terminal. This is my plot file: (inspired by an example in the book GNUPLOT in Action)
Code: Select all
set loadpath "C:/Program Files (x86)/gnuplot/bin/share/PostScript/"
set label 1 " '$\phi(x) = \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2} x^2}$' " at 1.2,0.25
set label 2 '$\Phi(x) = \int_{-\infty}^x \phi(t) dt$' at 1.2,0.8
set key top left Left # Interchange line sample and explanation
unset xtics
set xtics ( '$-\pi/2$' -pi/2, '$0$' 0, '$\pi/2$' pi/2 )
plot [-3:3] exp(-0.5*x**2) /sqrt(2*pi) t '$\phi(x)$',norm(x) t '$\Phi(x)$'
set terminal epslatex
set o "epslatex.tex" # Name of output LaTeX file with extension!
replot
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\section{The First Section}
This is a different document. We will include a \LaTeX\ file
containing the graph below.
\begin{figure}[h]
\begin{center}
\input{epslatex}
\end{center}
\caption{A Postscript file included in \LaTeX, with \LaTeX\ labels}
\end{figure}
And here is a second paragraph. The graph should have
been included before.
\section{The Second Section}
The second section really contains only a very short
text.
\end{document}
It is the same error a 100 hundred times. This error reports to the generated epslatex.tex file, and I check the line number 101, which contains nothing special but "\gplbacktext".! Text line contains an invalid character.
l. 101
Can you please help me out on how to get this epslatex thing working?
Best,
Steve