Add legend labels to map contour display
h = clegendm(...)
clegendm(...,unitstr) appends unitstr to each entry in the legend.
clegendm(...,strings) uses the strings specified in strings to label the legend. strings must have the same number of entries as the line children of h.
Contour matrix output from contourm, contour3m, or contourfm
Object handle output from contourm, contour3m, or contourfm
Any of the following integers, with the indicated placement:
Character string appended to each entry in the legend
Cell array of strings used to label the legend
Create a legend in the lower right-hand corner with a unit string indicating that the contour elevations are in meters:
load topo R = georasterref('RasterSize', size(topo), ... 'Latlim', [-90 90], 'Lonlim', [0 360]); figure('Color','w'); worldmap('world') [c,h] = contourm(topo, R, -6000:1500:6000); clegendm(c,h,4,' m')