Discussion:
Does MATLAB support LaTeX's \color or \textcolor commands?
(too old to reply)
Jeff Hall
2005-12-16 23:15:02 UTC
Permalink
Does the LaTeX interpreter currently in MATLAB support colorized text
with the \color or \textcolor commands? I need to color-code
information in a legend to a plot. It would be nice if I could do so
by colorizing the text string going into the legend before I actually
creates the legend.

I ask this question because I am using an older version of MATLAB and
was curious if this feature was included in a more recent version of
MATLAB.

Thanks
us
2005-12-16 23:22:21 UTC
Permalink
Jeff Hall:
<SNIP does ML-latex know about colors...

yes, eg,

title([
'{\color[rgb]{1 0 0}RED} or ',...
'{\color[rgb]{0 0 1}BLUE}',...
],...
'fontweight','bold',...
'fontsize',20);

us
Jeff Hall
2005-12-20 21:16:03 UTC
Permalink
What version of MATLAB are you using in your \color example? I was
unable to get your code to work in MATLAB 6.5 (from 2003?). Thanks.
Post by us
<SNIP does ML-latex know about colors...
yes, eg,
title([
'{\color[rgb]{1 0 0}RED} or ',...
'{\color[rgb]{0 0 1}BLUE}',...
],...
'fontweight','bold',...
'fontsize',20);
us
us
2005-12-20 23:01:10 UTC
Permalink
Jeff Hall:
<SNIP missing out on \color-tex in r13+...
What version of MATLAB are you using in your \color example...
sorry for this; i should have mentioned the release, which is r14.sp3
us

Loading...