Step 1: Create the image files using gnuplot
>> gnuplot
gnuplot>> set term epslatex
gnuplot>> set output "test_figure.tex"
gnuplot>> set xlabel '$\lambda_\theta$'
gnuplot>> set ylabel '$\omega - \mathrm{pi}$'
gnuplot>> set title 'This is a test'
gnuplot>> p sin(x) t 'sin(x)', cos(x) t 'cos(x)'
gnuplot>> exit
>>
Which should have made two files: test_figure.tex and test_figure.eps
Step 2: Compile figure in LaTeX document
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\input{test_figure.tex}
\end{figure}
\end{document}
This code can be compiled using pdflatex and will produce the following figure:
I love it!
ReplyDelete