multiple fonts in legend text

  • Follow


Is there a way to include two or more fonts in legend text?
0
Reply Vincent 11/18/2010 3:30:23 PM

"Vincent " <vince.b.engelkes@seagate.com> wrote in message <ic3gqf$ka2$1@fred.mathworks.com>...
> Is there a way to include two or more fonts in legend text?

Hello,

Tried to do the same, but I couldn't find a way.

If you try to alter the font for selected parts of the legend in the legend property editor, the whole legend is affected. This leads me to believe it's not possible to use multiple fonts w/o rewriting parts of the legend function.

If someone thinks it is possible, I'd be very interested.

Erik
0
Reply Erik 1/10/2011 6:22:06 PM


In article <igfioe$g41$1@fred.mathworks.com>,
 "Erik de Boer" <e.c.deboer@student.tudelft.nl> wrote:

> "Vincent " <vince.b.engelkes@seagate.com> wrote in message 
> <ic3gqf$ka2$1@fred.mathworks.com>...
> > Is there a way to include two or more fonts in legend text?
> 
> Hello,
> 
> Tried to do the same, but I couldn't find a way.
> 
> If you try to alter the font for selected parts of the legend in the legend 
> property editor, the whole legend is affected. This leads me to believe it's 
> not possible to use multiple fonts w/o rewriting parts of the legend 
> function.
> 
> If someone thinks it is possible, I'd be very interested.
> 
> Erik


Yes, it's possible.  Use \fontname{} to change the font:

  legend('The word {\fontname{times}Times} is in Times.')

You can also use \fontsize and \color.  See the help for the 'String' 
property of the function 'text'.

-- 
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.
0
Reply Doug 1/12/2011 12:54:15 AM

Doug Schwarz <see@sig.for.address.edu> wrote in message <see-AD320D.19541511012011@news.frontiernet.net>...
> Yes, it's possible.  Use \fontname{} to change the font:
> 
>   legend('The word {\fontname{times}Times} is in Times.')
> 
> You can also use \fontsize and \color.  See the help for the 'String' 
> property of the function 'text'.
> 
> -- 
> Doug Schwarz
> dmschwarz&ieee,org
> Make obvious changes to get real email address.

Many thanks Doug. My thesis just got a little more professional. 

Direct link for those interested:
http://www.mathworks.com/help/techdoc/ref/text_props.html
0
Reply Erik 1/13/2011 11:49:06 AM

3 Replies
974 Views

(page loaded in 0.077 seconds)

Similiar Articles:













7/20/2012 10:37:02 PM


Reply: