Skip to Main Content Skip to Search
Product Documentation

AxesTitleFont, FooterFont, HeaderFont, LegendFont, TextFont, TicksLabelFont, TitleFontfont of axes titles

AxesTitleFont etc. determine the fonts to be used for axes titles etc.

→ Examples

Attribute

Type

Value

See Also:

AxesTitles, Footer, Header, LegendText, LegendVisible, TicksAt, TicksLabelsVisible, Title

See Also:

See section Fonts in this document.

Details:

XXXFont

[<family>, <size>, <<Bold>>, <<Italic>, <color>>, <alignment>]  .

The meaning of the parameters is:

family

the font family name: a string. The available font families depend on the fonts that are installed on your machine. For example, typical font families available on Windows® systems are "Times New Roman" (of type “serif”), "Arial" (of type “sans-serif”), or "Courier New" (of type “monospace”). To find out which fonts are available on your machine, open the menu “Format”, submenu “Font” in your MuPAD® notebook. The first column in the font dialog provides the names of the font families that you may specify.  You may also specify one the three generic family names "serif", "sans-serif", or "monospace", and the system will automatically choose one of the available font families of the specified type for you. 

size

the size of the font in integral points: a positive integer. 

Bold

if specified, the font is bold. 

Italic

if specified, the font is italic. 

color

an RGB color value: a list of 3 numerical values between 0 and 1 

alignment

text alignment in case of new-lines: one of the flags Left, Center, or Right

 

Example 1

We specify the font for the canvas header:

plot(plot::Function2d(sin(x), x = 0 .. 2*PI),
     Header = "The sine function",
     HeaderFont = ["monospace", 14, Bold])

MuPAD graphics

We specify a font size of 18 pt for the canvas footer:

plot(plot::Function2d(sin(x), x = 0 .. 2*PI),
     Footer = "The sine function", FooterFont = [18])

MuPAD graphics

Example 2

With the “Symbol” font, it is possible to display Greek characters. The symbol PI is referred to as the letter p:

plot(plot::Function2d(cos(x), x = -PI..PI),
     XTicksNumber = None,
     XTicksAt = [-PI/2 = "-p/2", PI = "p"],
     TicksLabelFont = ["Symbol", 20])

MuPAD graphics

Note, however, that this font is used for all tick labels:

plot(plot::Function2d(cos(x), x = -PI..PI),
     XTicksNumber = None,
     XTicksAt = [-PI/2 = "-p/2", PI = "p", 1.0 = "one"],
     TicksLabelFont = ["Symbol", 20])

MuPAD graphics

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS