| Gauges Blockset | ![]() |
This example illustrates the use of multiple tick marks and the use of the ID property to manage them. Instead of modifying a block, this example examines the default settings for a particular block.
This figure shows the Amp Meter block. Notice that the tick marks have two different lengths. These are created by defining two sets of tick marks.

The first set consists of 11 longer tick marks, each positioned at one of the label values, positioned at increments of 1.0. The second set consists of five shorter tick marks for each integer change in the scale, positioned at increments of 0.2.
To examine how these tick marks have been created, double-click the Amp Meter block to display its properties dialog box. Select the Ticks tab.

The Ticks and TickID properties, in the box labeled 1, are defined as follows:
The Ticks property specifies how many sets of tick marks are used by the block. For this block, this property is set to 2.
The TickID property indicates which set of tick marks is defined by the other properties on this page. When specifying the characteristics of a set of tick marks, you set the TickID property, and then define the property values for that set of tick marks. In the dialog box page above, the settings for all the properties on the page apply to the first set, identified as TickID 0.
Note When you define multiple components, the first instance is identified by an ID of 0. In this example, the two sets of tick marks have IDs of 0 and 1. |
The Position/Size properties, in the box labeled 2, are defined as follows:
The Inner property defines the edge of the tick mark closest to the needle center and the Outer property defines the edge of the tick mark farthest from the needle center. To see where the tick marks are located relative to the needle length, examine the needle length by selecting the Needles page. The needle length is 2.0. The Inner position is 1.70 and the Outer position is 2.00. These tick marks are 0.3 units long.
The Width property of the tick marks is 0.00, the narrowest width.
The Range properties, in the box labeled 3, are defined as follows:
StartValue determines at which scale value the first tick mark is displayed. For these tick marks, the value is 0.
StopValue determines at which scale value the last tick mark is displayed. For these tick marks, the value is 10.
DeltaValue determines the interval between tick marks. For these tick marks, the value is 1.
The Labels properties On/Off check box, in the box labeled 4, determines whether the labels are displayed. For the first set of tick marks, the labels are displayed.
The FontID property, in the box labeled 5, determines which of multiple fonts defined for this block is used for the label. In this case, two font sets are defined. The first (FontID 0) is for the tick marks, while the second (FontID 1) is for the caption, "Amps."
To examine the second set of tick marks, change the TickID property value to 1 by clicking the up arrow to the left of the value. The Ticks page looks like this.

The Position/Size properties, in the box labeled 2, are defined as follows:
The Inner position is 1.90 and the Outer position is 2.00. These tick marks are 0.10 units long, one-third the length of the longer tick marks.
The Width property of the tick marks is 0.00, the same as the longer tick marks.
The Range properties, in the box labeled 3, are defined as follows.
StartValue for these tick marks is 0. The first short tick mark and the first long tick mark appear in the same place.
StopValue for these tick marks is 10. The last short tick mark and the last long tick mark appear in the same place.
DeltaValue determines the interval between tick marks. For these tick marks, the value is 0.2.
The Labels properties On/Off check box determines whether labels appear next to the tick marks. No labels appear next to this set of tick marks.
If you decrease the Ticks property, then the tick-mark settings corresponding to the highest TickID value is removed. To replace that set of tick marks, you will have to recreate the settings from the defaults.
| Modifying the Displayed Range | Controlling Multiple Graphical Elements | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |