clabel

Purpose

Contour plot elevation labels.

Synopsis

clabel(C)
clabel(C,V)
clabel(C,'manual')

Description

clabel(C) adds height labels to the current contour plot using the contour structure C output from contour. The label positions are selected randomly.

clabel(C,V) labels just those contour levels given in vector V. The default action is to label all known contours.

clabel(C,'manual') places contour labels at the locations selected with a mouse. Press the Return key to terminate labeling. Use the space bar to enter contours.

Examples

Generate, draw, and label a simple contour plot:

[x,y] = meshgrid(-2:.2:2);
z = x.^exp(-x.^2-y.^2);
c = contour(x,y,z);
clabel(c);

See Also

contour, contourc

(c) Copyright 1994 by The MathWorks, Inc.