Configure Model Style Elements
You can configure the colors and fonts of your block diagrams, and the depth of the block drop shadow. You can also copy the formatting of one model element and apply it to another.
For information about how to customize block icons, see Customize Block Icons.
Customize Model Colors
You can specify these colors in a block diagram:
Background color of any system
Outline and interior colors of any block
Text and background color of annotations
Background color of areas
For example, this image shows the Fault-Tolerant Fuel Control System with a black background and different block outline and interior colors.
To change a background color in a system, open the system. On the Format tab, select a color from the Background menu.
You can select a color from the menu or click Custom Color to define your own color.
Note
To add background images to your model, use image annotations. For more information about image annotations, see Create Image Annotations.
To change the outline color of a block, text color in an annotation, or interior color for an area, select the element. Then, on the Format tab, select a color from the Foreground menu. Changing the foreground color of a block also changes the color of its output signals.
To change the color of the port labels on a Subsystem block, change the foreground color of the corresponding Inport and Outport blocks inside the subsystem.
To change the interior color of a block or background color in an annotation, select the element, and then, on the Format tab, select a color from the Background menu.
You can also use the Property Inspector to change color for an area or an annotation. To specify colors programmatically, see Specify Colors Programmatically.
Customize Model Fonts
Change the font family, style, and size for any model element to make your block diagrams easier to read or to comply with company standards. You can modify the font for selected blocks, signal labels, areas, and annotations. Some blocks display text according to the font style settings. Some blocks have fixed fonts and styles. To increase the font size of those blocks, zoom in.
You can also change the default font for the model. The default font affects any elements whose font you have not changed and any new elements you create. If you want to use the same default font in all new models, change the default model font in your default template. See Set Default Template for New Models.
To change the font of a block, signal label, area, or annotation, select the element. Specify font information on the Format tab in the Font & Paragraph section.
To change the default fonts for the model, on the Format tab, click the Configure font for selected object(s) arrow , then click Fonts for Model. Use the Font Styles dialog box to specify the font information.
You can also use the Property Inspector to change font for an area or an annotation.
Select Font Dialog Box on Linux Machines
On Linux® machines configured for English, the Font style list in
the Select Font dialog box can appear out of order or in another language in some fonts.
If the characters in your Font style list appear in another language,
set the LANG
environment variable to en_US.utf-8
before you start MATLAB®. For example, at a Linux terminal, enter this command.
setenv LANG en_US.utf-8 matlab
Copy Formatting Between Model Elements
If you have applied formatting to a block, signal line, or area in a model, you can copy the formatting and apply it to another model element. Examples of formatting include font changes, foreground and background color selections, and drop shadow effects.
Select the block, line, or area whose formatting you want to copy.
From the action bar, select Copy Formatting. The cursor becomes a paintbrush.
Using the paintbrush, click each element that you want to copy the formatting to.
To cancel the paintbrush cursor, click a blank spot on the canvas or press Esc.
Increase Drop Shadow Depth
By default, blocks have a drop shadow. To make the block stand out more against the background, you can increase the depth of the drop shadow.
Select the blocks whose drop shadow depth you want to increase. Then, on the Format tab, click Shadow.
Tip
To remove the default drop shadow for all blocks, in the Simulink® Toolstrip, on the Modeling tab, select Environment > Simulink Preferences. In the Editor pane of the Simulink Preferences dialog box, select Use classic diagram theme.