Getting Started Previous page   Next Page

Specifying the Axes or Figure

MATLAB always creates an axes or figure if one does not exist when you issue a plotting command. However, when you are creating a graphics M-file, it is good practice to explicitly create and specify the parent axes and figure, particularly if others will use your program. Specifying the parent prevents the following problems:

The following examples shows a simple M-file that plots a function and the mean of the function over the specified range:


Previous page  Setting Object Properties Finding the Handles of Existing Objects Next page

© 1994-2005 The MathWorks, Inc.