Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: special symbols in figures

Subject: special symbols in figures

From: Thomas Clerc

Date: 06 Aug, 2007 10:11:03

Message: 1 of 9


I have a problem to write correctly the ylabel of a figure.
In LateX it is written:

 ln((L(\alpha,\hat{\tau}_{\alpha})))

but MatLab does not interprete it and put this expression
with all the slashes and stuff.

How could I do?

Thnak you

Thomas

Subject: Re: special symbols in figures

From: Loren Shure

Date: 06 Aug, 2007 11:17:57

Message: 2 of 9

In article <f96s3n$qgm$1@fred.mathworks.com>, thomas.clerc@unifr.ch
says...
>
> I have a problem to write correctly the ylabel of a figure.
> In LateX it is written:
>
> ln((L(\alpha,\hat{\tau}_{\alpha})))
>
> but MatLab does not interprete it and put this expression
> with all the slashes and stuff.
>
> How could I do?
>
> Thnak you
>
> Thomas
>

You need to work on your TeX code. Start by building it up. For
example,

ylabel('\alpha')
% and then try
ylabel('\alpha,{\tau}_{\alpha}')

Look here for more information on allowed TeX in MATLAB:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/text_props.htm
l

--
Loren
http://blogs.mathworks.com/loren/

Subject: Re: special symbols in figures

From: Loren Shure

Date: 06 Aug, 2007 11:19:56

Message: 3 of 9

In article <MPG.2120cd752d661810989795@news.mathworks.com>,
loren@mathworks.com says...
> In article <f96s3n$qgm$1@fred.mathworks.com>, thomas.clerc@unifr.ch
> says...
> >
> > I have a problem to write correctly the ylabel of a figure.
> > In LateX it is written:
> >
> > ln((L(\alpha,\hat{\tau}_{\alpha})))
> >
> > but MatLab does not interprete it and put this expression
> > with all the slashes and stuff.
> >
> > How could I do?
> >
> > Thnak you
> >
> > Thomas
> >
>
> You need to work on your TeX code. Start by building it up. For
> example,
>
> ylabel('\alpha')
> % and then try
> ylabel('\alpha,{\tau}_{\alpha}')
>
> Look here for more information on allowed TeX in MATLAB:
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/text_props.htm
> l
>
>

You may want to look at \wedge instead of \hat as well.

--
Loren
http://blogs.mathworks.com/loren/

Subject: Re: special symbols in figures

From: us

Date: 06 Aug, 2007 11:39:32

Message: 4 of 9

Thomas Clerc:
<SNIP latex-wows...

a hint:

     t='$ln((L(\alpha,\hat{\tau}_{\alpha})))$';
     text(.1,.5,t,'interpreter','latex');

us

Subject: Re: special symbols in figures

From: Naor Movshovitz

Date: 06 Aug, 2007 12:04:30

Message: 5 of 9

while on the subject, does anyone know why using a latex
interpreted text anywhere in the figure causes the exported
eps file to lose the very important bounding box
information? Thanks,
-naor (r2006a, winxp32)

Subject: Re: special symbols in figures

From: Thomas Clerc

Date: 06 Aug, 2007 12:33:58

Message: 6 of 9

"us " <us@neurol.unizh.ch> wrote in message
<f9719k$1a0$1@fred.mathworks.com>...
> Thomas Clerc:
> <SNIP latex-wows...
>
> a hint:
>
> t='$ln((L(\alpha,\hat{\tau}_{\alpha})))$';
> text(.1,.5,t,'interpreter','latex');
>
> us

Thank you all for your help.

I tried this code:

x=1:20; plot(x,sqrt(x));
t='$ln((L(\alpha,\hat{\tau}_{\alpha})))$';
ylabel(text(.1,.5,t,'interpreter','latex'));

It gives a plot with a number as ylabel instead of the
mathematical expression I want.

Any idea how to deal with that?



Subject: Re: special symbols in figures

From: us

Date: 06 Aug, 2007 12:46:19

Message: 7 of 9

Thomas Clerc:
<SNIP down to typo...

> ylabel(text(.1,.5,t,'interpreter','latex'));

must read:

     ylabel(t,'interpreter','latex');

us

Subject: Re: special symbols in figures

From: Thomas Clerc

Date: 06 Aug, 2007 12:53:23

Message: 8 of 9


It worked !!!!

Merci beaucoup à tous

Subject: Re: special symbols in figures

From: Thomas Clerc

Date: 06 Aug, 2007 13:15:52

Message: 9 of 9


It worked !!!!

Merci beaucoup à tous

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
ylabel us 06 Aug, 2007 08:50:20
syntax us 06 Aug, 2007 08:50:20
code us 06 Aug, 2007 07:50:34
latex us 06 Aug, 2007 07:50:34
interpreter us 06 Aug, 2007 07:50:34
text us 06 Aug, 2007 07:50:34
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics