This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

The plot attributes allow to specify the fonts AxesTitleFont, FooterFont, HeaderFont, LegendFont, TextFont, TicksLabelFont, and TitleFont. Each such font is specified by a MuPAD® list of the following form:

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

The parameters are:


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 Microsoft® 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.

sizethe size of the font in integral points: a positive integer.
Boldif specified, the font is bold
Italicif specified, the font is italic.
coloran RGB color value: a list of 3 numerical values between 0 and 1
alignmenttext alignment in case of new-lines: one of the flags Left, Center, or Right.

In the following example, 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]):

All font parameters are optional; some default values are chosen for entries that are not specified. For example, if you do not care about the footer font family for your plot, but you insist on a specific font size, you may specify an 18 pt font as follows:

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

Was this topic helpful?