I want to display text having few Greek symbols (\leq, \geq) in a MATLAB figure. I want to use 'Helvetica' font in bold with a 'FontSize' of 8.
I have tried using "tex" and "latex" interpreters but both of them had some issues and did not match my desired output.
1) I am using following code to annotate text using 'tex' interpreter.
t1 = text('String', '1.5 ms^{-1} \leq {\itu}_f < 2.0 ms^{-1}',... 'FontSize', 20, 'FontWeight', 'bold', 'Position', [.3 .3 0]);
As can be seen in output below, the formatting of the "less than or equal" symbol is different from the "less than" symbol.
2) I am using following code to annotate text using 'latex' interpreter.
t2 = text('String','$2.0\,\mathrm{ms^{-1}} \leq u_\mathrm{f} < 2.5\, \mathrm{ms^{-1}}$',...'Interpreter','latex','FontSize',20, 'Position', [.3 .5 0]);
As can be seen in output below, the two symbols are identical but not bold like the previous text object. Font is also changed.
Can you please suggest a workaround to fix this issue and get the output with desired text formatting requirements.
Best Answer