# psfragfig pdflatex image shifted and cropped

Some images inserted with psfragfig, are shifted to one side (right) and partially placed off the document. (see image, bottom figure is the one I'm talking about).

It occurs with TexShop whether I use pdflatex (using --shell-escape) or Tex+DVI.

The code I'm using to insert is :

\begin{figure}
\centering
\psfragfig{./figures/chapter1/intrinsic_error} % Generated by script_errors.m
\caption{Blah...}
\label{intrinsic_error}
\end{figure}


As you can guess, the image was generated by Matlab, using subplot and a tool called matlabfrag which generated the .tex file along with the .eps file. However, I have no problem with single-plot images inserted with the same code. Maybe matlabfrag is messing with the alignment properties in an incorrect way, but is there a workaround to simply shift the image back to the left with some psfragfig options ? Or should I use another tool to insert ?

Update : working example . The above would be inserted in :

Here is a working example... It's a PhD thesis, so not sure if the sample will be "enough" to understand my pb.

\documentclass[braunschweig]{thesis}

\usepackage[style=base,textfont={small,it},labelfont={it,bf}]{caption}
\usepackage[tight,scriptsize]{subfigure}
\usepackage{epstopdf}
\usepackage{lscape}

\usepackage{amsmath}
\usepackage{txfonts}
\usepackage{pstool}

\begin{document}

\end{document}

• Welcome to TeX.SX. You might have a look to our start page: it will help you to familiarize with the site. – Claudio Fiandrino May 28 '13 at 18:51
• Is it possible to add a minimal working example (MWE) that reproduces your situation starting with \documentclass{...} and ending with \end{document}. – texenthusiast May 28 '13 at 18:57
• Guess: Use [crop=pdfcrop] in pstool I did not ever try subplot in matlab instead used subfig or subcaption. Try \psfragfig[scale=0.5]{} can use angle, scale and some options of graphicx. – texenthusiast May 28 '13 at 19:04
• I can't write a working example in the comment. i'm limited by the number of characters. i'll try answering my own question. – Wall-E May 28 '13 at 19:38
• Bullseye ! Using [crop=pdfcrop] in pstool fixed it ! Thank you very much ! – Wall-E May 28 '13 at 19:49

Use [crop=pdfcrop] while loading pstool, I have not used subplot in Matlab instead used subfig or subcaption.

Try \psfragfig[scale=0.5]{} that can use angle, scale and some options of graphicx.