Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Does MATLAB support LaTeX's \color or \textcolor commands?

Subject: Does MATLAB support LaTeX's \color or \textcolor commands?

From: Jeff Hall

Date: 16 Dec, 2005 18:15:02

Message: 1 of 4

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

Subject: Does MATLAB support LaTeX's \color or \textcolor commands?

From: us

Date: 16 Dec, 2005 18:22:21

Message: 2 of 4

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

Subject: Does MATLAB support LaTeX's \color or \textcol

From: Jeff Hall

Date: 20 Dec, 2005 16:16:03

Message: 3 of 4

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.

us wrote:
>
>
> 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

Subject: Does MATLAB support LaTeX's \color or \textcol

From: us

Date: 20 Dec, 2005 18:01:10

Message: 4 of 4

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

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us