I am running Matlab R2010A on OS X 10.7.5
I have a simple matlab graph and you want to use LaTeX commands in axis and legend. However setting:
set(0, 'defaultTextInterpreter', 'latex');
It has a null effect and leads to a TeX warning that my tex commands cannot be parsed. If I open the plot tools of this plot, the interpreter will be set to "TeX" by default. Manually installing this in LaTeX is obviously a fix, but I can't do it for hundreds of graphs.
Now, if I get the default interpreter through the Matlab prompt, that is, get(0,'DefaultTextInterpreter')
He says βLaTeXβ, but again, when I look at the properties of the figure through the plot tool menu, the interpreter remains set to βTeXβ.
Print completion code:
figure f = 'somefile.eps' set(0, 'defaultTextInterpreter', 'latex'); ms = 8; fontSize = 18; loglog(p_m_sip, p_fa_sip, 'ko-.', 'LineWidth', 2, 'MarkerSize', ms); hold on; xlabel('$P_{fa}$', 'fontsize', fontSize); ylabel('$P_{m}$', 'fontsize', fontSize); legend('$\textbf{K}_{zz}$', 'Location', 'Best'); set(gca, 'XMinorTick', 'on', 'YMinorTick', 'on', 'YGrid', 'on', 'XGrid', 'on'); print('-depsc2', f);