Graphics |
Specifying the Target Axes
The current axes is the last one defined by subplot
. If you want to access a previously defined subplot, for example to add a title, you must first make that axes current.
You can make an axes current in three ways:
subplot
the m
, n
, i
specifiers.
subplot
with the handle (identifier) of the axes.
adds a title to the plot in the upper right side of the figure.
You can obtain the handles of all the subplot axes with the statement
MATLAB returns the handles of all the axes, with the most recently created one first. That is, h(1)
is subplot 224, h(2)
is subplot 223, h(3)
is subplot 222, and h(4)
is subplot 221. For example, to replace subplot 222 with a new plot, first make it the current axes with
Displaying Multiple Plots per Figure | Default Color Scheme |
© 1994-2005 The MathWorks, Inc.