clabel(C,h)
clabel(C,h,v)
clabel(C)
clabel(C,v)
tl = clabel(...)
clabel(...,Name,Value)
| Parameter | Description |
|---|---|
| C |
Contour matrix returned by contour, contourf, or contour3. If you pass a contour object h, you may pass [] for C. |
| h |
Contour object handle returned by contour / contourf / contour3. When provided, labeling uses information attached to the contour object (levels and contour matrix). |
| v |
Vector of contour levels to label. When provided, only these levels receive labels. |
| Parameter | Description |
|---|---|
| t |
Text objects created by clabel. The String properties contain the contour values displayed. |
| tl |
Text and line objects created when upright markers are used (for clabel(C)-style usage). |
The clabel function inserts labels into contour plots:
figure();
[x,y,z] = peaks;
[C,h] = contour(x,y,z);
clabel(C,h)
figure();
[x,y,z] = peaks;
[C,h] = contour(x,y,z);
v = [2,6];
clabel(C,h,v)
figure();
[x,y,z] = peaks;
[C,h] = contour(x,y,z);
clabel(C,h,'FontSize',15,'Color','red')
figure();
[x,y,z] = peaks;
C = contour(x,y,z);
clabel(C)
| Version | Description |
|---|---|
| 1.15.0 | initial version |