| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Mapping Toolbox |
| Contents | Index |
| Learn more about Mapping Toolbox |
contourcmap(cdelta,cmap)
contourcmap(cdelta,cmap,property,value,...)
hcb = contourcmap(...)
contourcmap(cdelta,cmap) creates a contour colormap for the current axes. A contour colormap is a colormap with color changes aligned to the color data. If cdelta is a scalar, contours are generated at multiples of cdelta. If cdelta is a vector of evenly spaced values, contours are generated at those values. The string input cmap is the name of the colormap function used in the surface. Valid entries for cmap include 'pink', 'hsv', 'jet', or any similar colormap function.
contourcmap(cdelta,cmap,property,value,...) allows you to add a colorbar and control the colorbar's properties. You turn the colorbar on with the property-value pair 'Colorbar' and 'on'. The location of the colorbar is controlled by the 'Location' property. Valid entries for Location are 'vertical' (the default) or 'horizontal'. Properties 'TitleString', 'XLabelString', 'YLabelString' and 'ZLabelString' set the respective strings. Property 'ColorAlignment' controls whether the colorbar labels are centered on the color bands or the color breaks. Valid values for ColorAlignment are 'center' or 'ends'. Property 'SourceObject' controls which object is used to determine the color limits for the colormap. The SourceObject value is the handle of a currently displayed object. If omitted, gca is used. Other valid property-value pairs are any properties and values that can be applied to the title and labels of the colorbar axes.
hcb = contourcmap(...) returns a handle to the colorbar.
Create a colormap and set color limits to make the color changes occur at multiples of 20 for the geoid.
load geoid figure worldmap(geoid, geoidrefvec) contourm(geoid, geoidrefvec, -120:20:100);
Add a colorbar, controlling the labels and font properties.
contourcmap(20, 'jet', 'colorbar', 'on');
Load and plot coastlines on top.
load coast plotm(lat, long, 'k')

contourfm, contourm, lcolorbar, demcmap
![]() | contour3m | contourfm | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |