1

I'm trying to include a MATLAB figure in LaTeX. The MATLAB figure has this text:

t1 = ['\phi = ', num2str(phi(k)),'^\circ'];
text(Pmax*1.05,sqrt(-X*Pmax*tp+E^2/2)*.95,t1,'rotation',90,'FontSize',8)

and the figure looks fine but when I \includegraphics the figure into LaTeX the degree symbol (\circ) changes to another Greek letter, a gamma I think.

My LaTeX code looks like this

\begin{figure}
\centering
\includegraphics{matlab/part1/pvfig}
\caption{Insert caption}
\end{figure}

Also the colors of the figure disappear.

Any suggestions?

  • 3
    This seems to be a problem on MATLAB's side rather than LaTeX. Without seeing the actual image (or the entire code used to generate the image in MATLAB), there's not much that can be done. If you're interested in LaTeX formatting of text within a graphic, perhaps using psfrag would be a suitable alternative? – Werner Sep 25 '11 at 15:20
3

It depends on the way you are using / printing the figure.

  1. You shouldn't use the way Save as instead use:

    print -depsc -loose filename.eps
    
  2. Or you can use \pdfinclusioncopyfonts=1 in your tex-file.

  3. Or you can use matfig2pgf Now you need the package pgf.

But this question is a little bit off topic. Maybe stack exchange mathematics can help you.

1

There are several possibilities to convert Matlab's .fig files into LaTeX figures. You could also try matlab2tikz. I must confess I have not tried it yet, but I'm pretty sure it works well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.