I am trying to include a small textbox with a table showing results in a plot. In the table I want to change the text color of only single words or symbols.
The table is created using tabular and LaTeX markup. For some reason some of the commands from the TextBox Properties like \it work, while \color{red} for example doesn't work. Do you know a way to make it colored?
figure
str = '\begin{tabular}{lr} $\it test$ & A \\ $\color{magenta} test$ & A\end{tabular}';
h = annotation('textbox',[.15 .15 .2 .28],...
'Interpreter', 'latex',...
'FitBoxToText','on',...
'EdgeColor','black',...
'BackgroundColor', [1 1 1]);
set(h, 'String', str);
