Colormaps for Terrain Data

Colors and colorscales (ordered progressions of colors) are invaluable for representing geographic variables on maps, particularly when you create terrain and thematic maps. The following section provides an example for applying colormaps and colorbars to maps.

In previous examples, the function demcmap was used to color several digital elevation model (DEM) topographic displays. This function creates colormaps appropriate to rendering DEMs, although it is certainly not limited to DEMs.

These colormaps, by default, have atlas-like colors varying with elevation or depth that properly preserve the land-sea interface. In cartography, such color schemes are called hypsometric tints.

Explore Colormaps for Terrain Data

To set up an appropriate map projection, pass the korea data grid and referencing vector to worldmap.

load korea
figure
worldmap(map,refvec)

Display the data grid with geoshow. Observe that the Korea DEM is displayed using the default colormap, which is inappropriate and causes the surface to be unrecognizable.

geoshow(map, refvec, 'DisplayType', 'surface')

Apply the default DEM colormap.

demcmap(map)

You can also make demcmap assign all altitudes within a particular range to the same color. This results in a quasi-contour map with breaks at a constant interval. Now color this map using the same color scheme coarsened to display 500 meter bands.

demcmap('inc',map,500)
colorbar

Note that the first argument to demcmap, 'inc', indicates that the third argument should be interpreted as a value range. If you prefer, you can specify the desired number of colors with the third argument by setting the first argument to 'size'.