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

# Thread Subject: italics label in legend

 Subject: italics label in legend From: J G Date: 9 Nov, 2010 21:56:04 Message: 1 of 9 Hi, here is my code for the legend: legend ((handlevector([1 4 7 10 11])), {'\it{t_2} = 0.1', ... But I only want the "t_2" bit in italics and the "= 0.1" bit in normal font. Can anyone help? Thanks!
 Subject: italics label in legend From: TideMan Date: 9 Nov, 2010 22:06:55 Message: 2 of 9 On Nov 10, 10:56 am, "J G" wrote: > Hi, here is my code for the legend: > > legend ((handlevector([1 4 7 10 11])), {'\it{t_2} = 0.1', ... > > But I only want the "t_2" bit in italics and the "= 0.1" bit in normal font.   > Can anyone help? > Thanks! What you've done works fine for me in Matlab R2006a.
 Subject: italics label in legend From: J G Date: 9 Nov, 2010 22:13:03 Message: 3 of 9 Hi, thanks for your reply. I have R2009b and it makes the whole thing in italics... TideMan wrote in message <94fa4e45-461a-4e8f-a8a4-40c271491ee4@n32g2000prc.googlegroups.com>... > On Nov 10, 10:56 am, "J G" wrote: > > Hi, here is my code for the legend: > > > > legend ((handlevector([1 4 7 10 11])), {'\it{t_2} = 0.1', ... > > > > But I only want the "t_2" bit in italics and the "= 0.1" bit in normal font.   > > Can anyone help? > > Thanks! > > What you've done works fine for me in Matlab R2006a.
 Subject: italics label in legend From: Doug Schwarz Date: 9 Nov, 2010 22:25:53 Message: 4 of 9 In article ,  "J G" wrote: > Hi, here is my code for the legend: > > legend ((handlevector([1 4 7 10 11])), {'\it{t_2} = 0.1', ... > > But I only want the "t_2" bit in italics and the "= 0.1" bit in normal font. > Can anyone help? > Thanks! Typographically, the correct thing is to set only the 't' in italics:   '{\itt}_2 = 0.1' You could also use the latex interpreter, but you have to set that property after the legend is created (at least in R2009a you do):   h = legend ((handlevector([1 4 7 10 11])), {'$t_2 = 0.1$', ...   set(h,'Interpreter','latex') -- Doug Schwarz dmschwarz&ieee,org Make obvious changes to get real email address.
 Subject: italics label in legend From: dpb Date: 9 Nov, 2010 22:21:39 Message: 5 of 9 J G wrote: > Hi, thanks for your reply. I have R2009b and it makes the whole thing > in italics...   legend ((handlevector([1 4 7 10 11])), {'\it{t_2} \rm= 0.1', ... (BTW, please don't toppost--hard follow conversation makes...) --
 Subject: italics label in legend From: J G Date: 9 Nov, 2010 22:42:04 Message: 6 of 9 dpb wrote in message ... > J G wrote: > > Hi, thanks for your reply. I have R2009b and it makes the whole thing > > in italics... > > legend ((handlevector([1 4 7 10 11])), {'\it{t_2} \rm= 0.1', ... > > (BTW, please don't toppost--hard follow conversation makes...) > > -- Great, thanks for your help
 Subject: italics label in legend From: dpb Date: 9 Nov, 2010 22:43:17 Message: 7 of 9 Doug Schwarz wrote: ... > Typographically, the correct thing is to set only the 't' in italics: > > '{\itt}_2 = 0.1' ... '\itt\rm_2 = 0.1' should do that, then. At least in my early release (R12), the parens are passed thru to appear as text in the legend rather than stripped to surround the formatting string... --
 Subject: italics label in legend From: Doug Schwarz Date: 9 Nov, 2010 23:33:30 Message: 8 of 9 In article ,  dpb wrote: > Doug Schwarz wrote: > ... > > > Typographically, the correct thing is to set only the 't' in italics: > > > > '{\itt}_2 = 0.1' > ... > > '\itt\rm_2 = 0.1' > > should do that, then. > > At least in my early release (R12), the parens are passed thru to appear > as text in the legend rather than stripped to surround the formatting > string... > > -- Those aren't parentheses, they're curly braces and they are the proper way to limit the scope of a command, \it in this case. -- Doug Schwarz dmschwarz&ieee,org Make obvious changes to get real email address.
 Subject: italics label in legend From: dpb Date: 10 Nov, 2010 00:58:06 Message: 9 of 9 Doug Schwarz wrote: ... > Those aren't parentheses, they're curly braces and they are the proper > way to limit the scope of a command, \it in this case. Ah....eyes aren't so sharp any more...forgot about the braces, sorry. --