Reputation: 467
I created .eps file from matlab figure using the export setup option in the matlab figure File menu, and then pressing the export button in the opened dialog box. In Latex document I added the next lines:
\begin{figure}[H]
\begin{center}
\includegraphics[width={0.7\textwidth}]{loglogRateVsIntensity.eps}
\caption{Rates}
\label{fig:ratesVersusIntensity}
\end{center}
\end{figure}
The Figure indeed appears in the document, but not centered and also with excessive amount of space preceding it, and part of it is covering the next lines of the document. I have included to the Latex document: \usepackage{float} in order to have figures appear right where I place them in the latex document, but some how for this .eps figure this command is being ignored.
Any ideas what can I do to get it fixed ???
Upvotes: 2
Views: 1671
Reputation: 347
I strongly recommend export_fig. It works like a charm.
To export the current figure as file_name.eps write (requires ghostscript and pdftops -> explained under the link above):
export_fig file_name -eps
export_fig gets also rid of the space preceding the image. I think the formatting of the image should also solve the centering problem in latex.
Cheers
Upvotes: 3