How do I show land areas that have negative elevation in a map as green using the function DEMCMAP in the Mapping Toolbox 3.2 (R2010b)? I am using HDR and elevation files for a tile that has land areas below sea level. That is, some land areas in this tile have elevations less that zero. This negative elevation land area is currently appearing as blue. Reproduction Steps: Lets assume that the tile "a" has land areas with negative elevations in your current folder. % read globe file [z,rv]=globedem('a',10); % plot globe file figure; worldmap(z,rv) geoshow(z,rv,'DisplayType','texturemap'); demcmap(z)
John Michell answered .
2025-11-20
[z,rv]=globedem('a',10);
figure;
worldmap(z,rv)
geoshow(z,rv,'DisplayType','texturemap');
colorbar
% Adapt to the specific data grid.
minZ = min(z(:));
maxZ = max(z(:));
elevationInc = 10;
belowSeaLevelCMap = @gray;
oceanColor = [0 0 1];
colordem(minZ, maxZ, elevationInc, belowSeaLevelCMap, oceanColor)