Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

Editing Plots

Plot Edit Mode

Plot edit mode lets you select specific objects in a graph and enables you to perform point-and-click editing of most of them.

Enabling Plot Edit Mode

To enable plot edit mode, click the arrowhead in the figure toolbar:

You can also select Edit Plot from the figure Tools menu.

Setting Object Properties

After you have enabled plot edit mode, you can select objects by clicking them in the graph. Selection handles appear and indicate that the object is selected. Select multiple objects using Shift+click.

Right-click with the pointer over the selected object to display the object's context menu:

The context menu provides quick access to the most commonly used operations and properties.

Using the Property Editor

In plot edit mode, double-clicking an object in a graph opens the Property Editor GUI with that object's major properties displayed. The Property Editor provides access to the most used object properties. When you select an object, it updates to display the properties of whatever object you select.

Accessing Properties with the Property Inspector

The Property Inspector is a tool that enables you to access most Handle Graphics properties and other MATLAB objects. If you do not find the property you want to set in the Property Editor, click the More Properties button to display the Property Inspector. You can also use the inspect command to start the Property Inspector. For example, to inspect the properties of the current axes, type

inspect(gca)

The following picture shows the Property Inspector displaying the properties of a graph's axes. It lists each property and provides a text field or other appropriate device (such as a color picker) from which you can set the value of the property.

As you select different objects, the Property Inspector updates to display the properties of the current object.

The Property Inspector lists properties alphabetically by default. However, you can group Handle Graphics objects, such as axes, by categories which you can reveal or close in the Property Inspector. To do so, click the icon at the upper left, then click the + next to the category you want to expand. For example, to see the position-related properties, click the + to the left of the Position category.

The Position category opens and the + changes to a - to indicate that you can collapse the category by clicking it.

Using Functions to Edit Graphs

If you prefer to work from the MATLAB command line, or if you are creating an M-file, you can use MATLAB commands to edit the graphs you create. You can use the set and get commands to change the properties of the objects in a graph. For more information about using graphics commands, see Understanding Handle Graphics Objects.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS