As you build a model, you can adjust block positions, change block and background color, adjust fonts, and add elements that help to improve model readability. These changes can help to organize the model visually and help others understand the model when you share it.
You can make these types of changes to improve model readability:
Flip or rotate blocks. These adjustments help blocks to fit in the model and connect with other blocks. See Flip or Rotate a Block.
Reposition or hide block names. See Move and Hide Block Names.
Add colors to blocks and to the background. See Specify Model Colors.
Surround groups of blocks with a box to show that the blocks are related. See Box and Label Areas of a Model.
Document a model using text, image, and math annotations. See Create an Annotation.
Annotate a block. See Set Block Annotation Properties.
Change the block icon, for example, display a graphic on the block. Use a mask to achieve this effect. A mask also enables you to design a custom interface for a block. To learn about masks, see Masking Fundamentals.
You can change the orientation of a block by rotating it in 90-degree increments or by flipping it 180 degrees about its horizontal or vertical axis. Rotate or flip a block so that it fits better in the model, for example, in feedback loops. You might also need to rotate a block so that inports align with outports.
The figure shows a Gain block flipped to simplify a feedback loop diagram.
To rotate or flip a block, select the block and select a command from the Diagram > Rotate & Flip menu. You can rotate clockwise (Ctrl+R) or counterclockwise.
The Flip Block command flips the block based on the orientation of its ports. For example, if the ports are on the sides, the block flips horizontally (about its vertical axis).
Rotating moves block ports from the sides to top and bottom or the reverse, depending on the placement of the ports. The resulting positions of the block ports depend on the block port rotation type.
Rotating can reposition the ports on some blocks to maintain left-to-right or top-to-bottom port numbering order. A block whose ports are reordered after a rotation have thedefault port rotation type. This policy helps to maintain the left-right and top-down block diagram orientation convention used in control system modeling applications. Blocks by default use this rotation policy. The figure shows the effect of clockwise rotation on a block with the default port rotation policy.
A masked block can specify for ports to keep their order after rotation (see Port rotation). These blocks have a physical port rotation type. This policy helps when designing blocks to use in mechanical and hydraulic systems modeling and other applications where diagrams do not have a preferred orientation. The figure shows the effect of clockwise rotation on a block with a physical port rotation type.
Flipping a block moves the ports to the opposite side of the block, creating a mirror image, regardless of port rotation type.
By default, block names appear below blocks whose ports are on the sides and to the left of blocks whose ports are on the top and bottom. You can change the location of a block name, and you can hide block names.
To change the location of a block name, you can:
Drag the block name to the opposite side of the block.
You can specify the outline and interior colors of any block, and you can change the background color for any system in a model. You can also change text color and background color for annotations and fill color for areas.
This subsystem of the model
color to identify the inports.
To change outline color on a block, text color in an annotation, or interior color for an area, select the element, and then select Diagram > Format > Foreground Color.
To change interior color on a block or background color in an annotation, select the element, and then select Diagram > Format > Background Color.
To change a background color in a system, open the system, and then select Diagram > Format > Canvas Color.
You can select a color from the menu or select Custom to open the color picker and define your own color.
You can also use the property inspector to change color for an area or an annotation. To specify colors programmatically, see Specify Colors Programmatically
Change font family, style, and size for any model element to make your model easier to read or to comply with company standards. You can modify the font for selected blocks, signal labels, areas, and annotations. Changing a block's font changes the font for the name and for text that appears on the block.
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 Use Customized Settings When Creating New Models.
To change the font of a block, signal label, area, or annotation, select the element, and then select Diagram > Format > Font Style for Selection. Use the dialog box to specify the font information.
To change the default font for the model, with no selection, select Diagram > Format > Font Style for Model. Use the dialog box to specify the font information.
You can also use the property inspector to change font for an area or an annotation.
Select the blocks whose drop shadow depth you want to increase, and then select Diagram > Format > Block Shadow.
Tip To remove the default drop shadow for all blocks, select the Simulink® Editor preference Use classic theme.
Add an area to your model to visually group related model elements in a box. An area can move with the blocks it surrounds. You can add text to an area to briefly describe or label the area.
Drag a box around the area of interest in the model.
For example, in the top level of the model
drag a box around the four Constant blocks that store the failure
values of the sensors.
From the action bar, select Create Area.
Type the name of the area. The name appears in the upper-left corner of the area.
To enter the name later, select the area, click the ?, and start typing, or use the Name property in the property inspector.
Optionally, add a description of the area contents using the property inspector.
To move the area and its contents, drag the area near the border.
Tip To move an area without moving its contents, hold Alt (option on a Mac) and drag.
Alternatively, you can drag an area box from the palette onto the canvas, resize the box, and move it to the desired location.
An area is similar to a subsystem in that it is a way to group related blocks. However, a subsystem creates a hierarchy, replacing multiple blocks in a model with a single block. You can initially group related blocks in an area and later decide to put those blocks in a subsystem by converting the area. The resulting subsystem has the same name, blocks, description, and requirements traceability information as the area.
To convert an area to a subsystem, right-click the area and select Create Subsystem from Area.