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

Thread Subject: Possible to use latex math mode in legend?

Subject: Possible to use latex math mode in legend?

From: saneman

Date: 24 Jun, 2008 09:12:08

Message: 1 of 3

I have made a legend for a figure:

h = legend('C1','C2','C3','Unknown',4);
set(h,'Interpreter','none')

But is there someway to use latex math mode in a legend so I can get
subscripts:

h = legend('C_1','C_2','C_3','Unknown',4);

?


Subject: Possible to use latex math mode in legend?

From: saneman

Date: 24 Jun, 2008 09:14:12

Message: 2 of 3


"saneman" <asd@ad.com> skrev i en meddelelse
news:g3qdp1$hu8$1@news.net.uni-c.dk...
>I have made a legend for a figure:
>
> h = legend('C1','C2','C3','Unknown',4);
> set(h,'Interpreter','none')
>
> But is there someway to use latex math mode in a legend so I can get
> subscripts:
>
> h = legend('C_1','C_2','C_3','Unknown',4);
>
> ?
>

Using 'tex' as interpreter solved the problem!

set(h,'Interpreter','tex')


Subject: Possible to use latex math mode in legend?

From: Ole.Kessler@googlemail.com

Date: 16 Aug, 2008 11:18:21

Message: 3 of 3


> set(h,'Interpreter','tex')

i'd rather prefer:

 set(h,'Interpreter','latex')

in order to use

h = legend('Value: $\pi = 3.14$');

Tags for this Thread

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.

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