Mike22LFC
Mike22LFC

Reputation: 997

Greek letter \xi issue in Matlab eps print out

When I plot a figure and type greek letter in the title, it looks like

enter image description here

However, when I save the figure as EPS output, the eps file looks like enter image description here

It's obviously that the Greek letter \xi_p disappears. Anyone who knows what happened and solutions, please give me a reply. It would be much grateful.

Best regards, mike

Upvotes: 1

Views: 547

Answers (3)

shamalaia
shamalaia

Reputation: 2351

I think that the best solution is to set the latex interpreter as default:

set(0,'defaulttextinterpreter','latex')

but of course it depends case by case.

Upvotes: 0

Mike22LFC
Mike22LFC

Reputation: 997

First I would like to thank KiW for the help. I found a solution that works with my MATLAB 2014b.


Solution by specifying the interpreter directly in the code

We can set the interpreter-property directly to latex when calling xlabel or title as shamalaima pointed out in a comment:

xlabel('$\xi_{\textrm{p}}$','Interpreter','latex');
title('$\xi_{\textrm{p}}$','Interpreter','latex');

Solution using the property editor

Another way to do it is by using the property editor as follows:

  1. After making the figure, click the white arrow and click the title (or label).

    enter image description here

  2. In the Property Editor, change the Interpreter to latex.

    enter image description here enter image description here

  3. After this, choose the Axes. We can now find the title editor in the left bottom side. Just write the title as you do in latex. Mine would be $\xi_{_\textrm{p}}=1e$-$4a_{_\textrm{ho}}$ in the font of Times New Roman.

  4. It works now in my EPS output.

    enter image description here enter image description here

Upvotes: 3

KiW
KiW

Reputation: 593

Using EPS Viewer the symbol is not lost. As you can see in the picture that works perfectly fine. I used:

plot(x,y)
title('\xi _{P}=1e-4a _{ho}')

So I assume it could be a problem of the program you use to open your .EPS file

enter image description here

Upvotes: 2

Related Questions