
3 Graphics
draws a 20-sided polygon with little circles at the vertices. The axis equal
command makes the individual tick-mark increments on the x-andy-axes the
same length, which makes this plot more circular in appearance.
Adding P
lots to an Existing Graph
The hold
command enables you to add plots to an existing graph. When
you type
hold on
MATLAB does not replace the existing graph when you issue another p lotting
command; it adds the new data to the current graph, rescaling the axes
if necessary.
For exam ple, these statements first create a contour plot of the
peaks
function, then superimpose a pseudocolor plot of the same function:
[x,y,z] = peaks;
pcolor(x,y,z)
shading interp
3-54
Kommentare zu diesen Handbüchern