Quantcast
Channel: MATLAB Central Newsreader - tag:"figure"
Viewing all articles
Browse latest Browse all 117

Same characters with Tex and Latex

$
0
0
Hi,

I am writing some stuff in Latex and I'd like to have the same characters in my MATLAB figures, but I can only write a non-italic mu in Tex (i.e. for micrometers), how can I get the other characters to look the same?

All the characters I want are in the following code, but not in a single label!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure

ylabel(['{\it v}(' char(181) 'm)'],'interpreter','tex','FontName','Times New Roman')
xlabel('$v$($\mu$m)','interpreter','latex')
 
dim = [.2 .6 .3 .3];
annotation('textbox',dim,'String','I want this $v$','FitBoxToText','on', ...
           'edgecolor','none','interpreter','latex','fontsize',20);

dim = [.6 .1 .3 .3];
annotation('textbox',dim,'String',['and this ' char(181) '!'],'FitBoxToText','on', ...
           'edgecolor','none','interpreter','tex','fontsize',20,'FontName','Times New Roman');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Thanks.

Viewing all articles
Browse latest Browse all 117

Trending Articles