In my figure I have a text annotation using the LaTeX interpreter, and it doesn't recognize \checkmark because MATLAB doesn't have the amsmath package.
Are there any ideas for a workaround? Perhaps I can have part of the text box interpreted with LaTeX, and part of it without? In that case I could use this solution.
it's not pretty, but might be good enough:
xlabel('$\surd$','interpreter','latex')
or look here for other things that look like a tick
http://detexify.kirelabs.org
Related
I converted a matlab fig to eps, I need to add the grid to this figure which now I have in eps format. Is there any possibility. I know I can change the title or labels using ultraedit or similar programs but cant identify the relevant place for grid.
Yes, you simply need to read the PostScript program and then modify it to be suitable for your needs.
You will, however, probably need a working knowledge of the PostScript language in order to understand the program and succesfully modify it.
When I plot a figure and type greek letter in the title, it looks like
However, when I save the figure as EPS output, the eps file looks like
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
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:
After making the figure, click the white arrow and click the title (or label).
In the Property Editor, change the Interpreter to latex.
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.
It works now in my EPS output.
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
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.
So much I'm missing the Emacs power when I (have to) stay inside Mathematica editor. I saw a few mathematicas-mode, but they are all outdated... Any suggestions?
So recently I decided to not use the standard markers that Matlab provides and use my own via: a set of fonts including Webdings or WingDings. I make a standard scatter plot, and plot the text (in wingdings), using the text command, over the locations of the markers.
When I save these plots as png files, they print perfectly. They also appear perfectly on my screen after plotting.
However when I save these plots as eps files, the webdings are turning into their original letters 'l' or 'w'. It also looks like it's plotting them in a Courier font, but my default is Helvetica.
I've read through this previous post, but my question differs in that he is looking to use Latex as the interpreter and to include fonts, whereas I don't want to use Latex as the interpreter. However, it seems like my default interpreter (not sure what that is), isn't doing the job when converting to EPS.
Example:
imageR='w'
text(xf2,yf2,imageR,'fontName',font,'FontSize',fontR,'HorizontalAl','left','color','w')
I figured it out....took me way too long.
Ghostscript / Postscript only export with a few fonts when you are exporting eps files.
This link was incredibly helpful.
I just switched from wingdings/webdings to ZapfDinbats...Practically the same thing...
I want to include a script English letter, say \mathscr{T} in the Y-axis label in a Matlab figure. Is there an easy way to do this? Thank you.
Matlab's LaTeX interpreter doesn't seem to recognize \mathscr. But it accepts \mathcal:
ylabel('$\mathcal{T}$','Interpreter','LaTeX','Fontsize',12)