From comments to a different answer, I gather that you want to include plots generated with gnuplot
.
Gnuplot
comes with many different "terminals", which are output filters that generate different file formats. A common one is postscript
(which generates postscript files), or png
for generating PNG raster images. If you build your plots interactively from a gnuplot
command line, you are probably using the wxt
terminal, which outputs the plots to your screen.
For including gnuplot
plots in LaTeX documents, there are other terminals that are better suited than the terminals which generate standalone image files, because they let LaTeX take care of typesetting the text:
The epslatex
terminal generates two files: One .tex
file that includes all of the text and numbers, and one .eps
file that includes the graphics.
To use it, do the following: After setting up your plot as usual (by using a sequence of setup commands or by loading a gnuplot
file) issue the command set terminal epslatex color
at the gnuplot>
prompt; then set out "filename.tex"
; replot
(or just plot
followed by the function, if that is all you need); and finally set out
without a file name, which closes the files. You have now generated the .tex
and .eps
files.
In your LaTeX document, you just include the graph using \input{filename}
, the .eps
file will be included automatically. If you want a bigger font size, just use \large{\input{filename}}
instead.
The tikz
terminal generates a .tex
file that contains TikZ code to generate the graph directly in LaTeX.
To use it, you use set terminal tikz
, after that the procedure is identical to that for the epslatex
terminal. In your LaTeX document you must also load the gnuplot-lua-tikz
package.
Here's a complete example using the epslatex terminal
:
In gnuplot
:
gnuplot> set terminal epslatex color
Terminal type set to 'epslatex'
Options are ' leveldefault color blacktext dashed dashlength 1.0 linewidth 1.0 butt noclip palfuncparam 2000,0.003 noheader "" 11 '
gnuplot> set out "epslatexfile.tex"
gnuplot> set samples 400, 400
gnuplot> plot [-10:10] real(sin(x)**besj0(x))
gnuplot> set out
A minimal LaTeX document to include the output from gnuplot
could look like this:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\centering
\input{epslatexfile}
\end{document}
Yielding this output:
pspdf -dAutoRotatePages=/None myfile.dvi
and if this dows not help, then provide your eps file