| 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 |
demcmap(Z)
demcmap(Z,ncolors)
demcmap(Z,ncolors,cmapsea,cmapland)
demcmap(color,Z,spec)
demcmap(color,Z,spec,cmapsea,cmapland)
demcmap(Z) creates and assigns a colormap for elevation data grid Z. The colormap has the number of land and sea colors in the same proportions as the maximum elevations and depths in the data grid. With no output arguments, the colormap is applied to the current figure and the color axis is set so that the interface between the land and sea is in the right place.
demcmap(Z,ncolors) makes a colormap with a length of ncolors. The default value is 64.
demcmap(Z,ncolors,cmapsea,cmapland) allows the default colors for sea and land to be replaced. The colors in the created colormap are interpolated from the RGB color matrix inputs, which can be of any length. You can retain default colors for either land or sea by providing an empty matrix in place of the color matrices. You can specify the current figure colormap by entering the string 'window' in place of either RGB matrix.
demcmap(color,Z,spec) uses the color string to define a colormap. If the string is set to 'size', spec is the length of the colormap. If it is set to 'inc', spec is the size of the altitude range assigned to each color. If omitted, color is 'size' by default.
demcmap(color,Z,spec,cmapsea,cmapland) allows for both coloring options along with specified colors.
Display the world topographical map using grayscale colors:
load topo axesm hatano meshm(topo,topolegend) demcmap(topo,64,[0 0 0],[.2 .2 .2; 1 1 1])

caxis, colormap, meshlsrm, meshm, surflsrm, surfm
![]() | degtorad | departure | ![]() |

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 |