Graphics Programs Reference

In-Depth Information

axis ij

Usually images like this do not need the axes:

axis off

A three-dimensional example now:

clf

sphere

colormap(fitrange(gray,.5,1))

view(5,5)

axis equal

matlab has drawn a biggish sphere because the near perpendicular view-

point allows the axes to fit within the default plotting area. If we change

the viewpoint:

view(45,45)

the sphere is drawn smaller because the axes are more oblique to the

plane. Now go back to the first viewpoint, switch on the
vis3d
axis

behaviour, and then return to the second viewpoint:

view(5,5)

axis vis3d

view(45,45)

The sphere is kept a constant size (cf. plot before last, above), which

forces the axes to extend beyond the plotting area (and, in this case,

beyond the Figure area too). You should turn on
axis vis3d
whenever

you are viewing three-dimensional objects from different angles. In such

situations the axes are usually superfluous anyway, so why not get rid

of them?

axis off