Graphics Previous page   Next Page

The Figure Palette

The Figure Palette contains three panels. Select the panel you want to view by clicking the respective button, which twists down the panel and exposes its contents.

The Figure Palette enables you to perform the following tasks with these panels:

Adding Subplot Axes

The New Subplots panel enables you to create a grid of either 2-D or 3-D axes. To display the selector, click the grid icon next to the axes type. MATLAB displays the selector grid.

As you move the cursor, squares darken to indicate the layout of axes that will be created if you release the mouse button. Click Cancel at the bottom of the grid to leave the figure unchanged.

The picture above shows the New Subplots panel selected to display four equally sized axes in the figure. Existing axes resize as required to accommodate the new layout.

Plotting Workspace Variables

The Variables panel displays current workspace variables. Double-clicking a variable in this panel opens that variable in the Array Editor. If you select a variable and right-click to display the context menu, you can select a graphics function to plot the variable.

For example, the following picture illustrates how to plot the columns of variable Z. This is equivalent to passing a matrix to the plot function.

The context menu contains a list of possible plot types based on the variable you select and also enables you to perform certain operation on the variable, such as opening it in the Array Editor, saving, copying, and so on.

Note that the context menu items may change when you select different variables because a particular variable might be incompatible some of the plot types.

Drag and Drop Plotting

You can also drag the variable directly into an axes, in which case MATLAB selects the first appropriate plot type for that variable. If there are multiple axes, you must first select the one you want to plot in and then drag the variable to that axes.

In the previous example, the variable Z would be plotted using the plot function if you were to drag it into an axes.

If the desired plotting function is not available from the context menu, you can select More Plots to display the Plot Catalog tool.

The Plot Catalog Tool

The Plot Catalog tool provides access to most of the MATLAB plotting functions. You can type any workspace variables in the Plotted Variables field, which are then passed to the selected plotting function as arguments. Separate variables with a comma.

You can also enter a MATLAB expression using any workspace variables shown in the Figure Palette.

The following picture shows the Plot Catalog tool and describes its components.

Adding Annotations to Graphs

The Annotations panel enables you to insert annotation objects into a plot. To add an object, first select the object you want to add, and then click and drag the mouse to position and size the object.

See How to Annotate Graphs for more information about the various types of annotation objects.


Previous page  Plotting Tools -- Interactive Plotting The Plot Browser Next page

© 1994-2005 The MathWorks, Inc.