Graphics |
Enclosing Regions of a Graph in a Rectangle or an Ellipse
You can add a rectangle or an ellipse to draw attention to a specific region of a graph. While either object is selected, you can move and resize it as well as display a right-click context menu that enables you to modify behavior and appearance.
Insert the rectangle or ellipse by clicking the corresponding icon in the plot edit toolbar
or by selecting Rectangle or Ellipse from the Insert menu. MATLAB changes the cursor to a cross indicating you can click down, drag, and release the left mouse button to define the size and shape of the object.
Pinning Rectangles and Ellipses
You can attach the rectangle to a particular point in the figure by pinning it to that point. There are three ways to pin the rectangle:
By default, pinning attaches the lower left corner of the rectangle or ellipse to its current location in the axes data units. You can move the point of attachment by clicking on the corner and dragging the anchor to another point. The cursor changes to a pin while you are dragging.
Note that you cannot drag or resize a rectangle or an ellipse when it is pinned.
Modifying the Rectangle or Ellipse from the Context Menu
Right-click on the rectangle or ellipse to display its context menu.
The menu contains the following options:
Setting Rectangle and Ellipse Properties
You can use the Property Editor to set rectangle and ellipse properties by selecting Properties from the context menu. The Property Editor displays the same properties that are described above in the context menu section.
You can click the Inspector button on the Property Editor to display the Property Inspector. The Property Inspector displays all properties for the selected annotation object. However, you should not change some of these properties because doing so can affect the proper functioning of the annotation object. See the following sections for descriptions of the properties you can change on the respective objects.
How to Annotate Graphs | Textbox Annotations |
© 1994-2005 The MathWorks, Inc.