Getting Started Previous page   Next Page

Editing Plots

MATLAB automatically formats graphs by setting the scale of the axes, adding tick marks along axes, and using colors and line styles to distinguish the data plotted in the graph. However, if you are creating graphics for presentation, you can change the default formatting or add descriptive labels, titles, legends and other annotations to help explain your data.

Plot Editing Mode

Plot editing mode enables you to perform point-and-click editing of the graphics objects in your graph.

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

Once you have enabled plot edit mode, you can select objects by clicking on 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 on an object in a graph starts the Property Editor with that object's major properties displayed. The Property Editor provides access to the most used object properties. It is updated to display the properties of whatever object you select.

Accessing All Properties -- Property Inspector

The Property Inspector is a tool that enables you to access all object properties. If you do not find the property you want to set in the Property Editor, click the Inspector button to display the Property Inspector. You can also use the inspect command to start the Property Inspector.

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 is updated to display the properties of the current object.

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 Handle Graphics.


Previous page  Selecting Plot Types Examples -- Using MATLAB Plotting Tools Next page

© 1994-2005 The MathWorks, Inc.