# How can I maintain the size of epslatex figures after embedding into a LaTeX documnet?

I use the following commands to plot a figure in epslatex.

set terminal epslatex size 3.0in,2.25in font ',8'
set output 'filename.tex'


The epslatex terminal produces two files: filename.tex and filename.eps. As discussed in Gnuplot epslatex terminal not showing axis text, I embed this tex file filename.tex into a latex document by:

\documentclass[conference]{IEEEtran}

\begin{figure}[!t]
\centering
\includegraphics{filename}
\caption{simulation result}
\label{f_sim}
\end{figure}


However, the figure size is much larger than 3.0in,2.25in. How can I keep the figure size unchanged?

## migrated from stackoverflow.comJul 28 '15 at 7:45

This question came from our site for professional and enthusiast programmers.

Please do always give full but minimal scripts and documents. The snippets you give aren't compileable. It are quite often those parts which aren't posted which make the problems.

Here a short example, which works fine:

A gnuplot script filename.gp:

set terminal epslatex size 3.0in,2.25in font ',8'
set output 'filename.tex'
plot x


And a document main.tex with the content

\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\input{filename}
\caption{simulation result}
\end{figure}
\end{document}


Now run

gnuplot filename.gp
pdflatex main.tex


to get a document with a correctly sized image.