contour3m

Project 3-D contour plot of map data

Description

The contour3m function is the same as the contourm function except that the lines for each contour level are drawn in their own horizontal plane, at the z-coordinate equal to the value of that level.

Examples

expand all

Contour EGM96 Geoid Heights as 3-D Surface

This example shows how to contour the EGM96 geoid heights in an ordinary axes as a 3-D surface with 50 levels and set the contour line color to black.

Load the geoid.

figure('Color','white')
load geoid
contour3m(geoid,geoidrefvec,50,'LineColor','black');

Add the geoid as a surface.

hold on
geoshow(geoid,geoidrefvec,'DisplayType','surface')

Add a title.

title('EGM96 Global Geoid Heights with 50 Contour Levels');

View in 3-D.

view(3)

Contour topography and bathymetry of South Asia

This example shows how to contour in a map axes the topography and bathymetry of South Asia and the northern Indian Ocean with a contour interval of 500 meters.

Load topo.

load topo
latlim = [ 0  50];
lonlim = [35 115];
[Z, refvec] = maptrims(topo, topolegend, latlim, lonlim);
figure('Color','white')
axesm('lambertstd','MapLatLimit', latlim, 'MapLonLimit', lonlim)
tightmap; axis off
contour3m(Z,refvec,'black','LevelStep',500)

Add the geoid as a surface and set the colormap.

geoshow(Z,refvec,'DisplayType','surface')
demcmap(Z)

Add a title.

title({'South Asia Topography and Bathymetry', ...
   'with 500 m Contours'});

View in 3-D

set(gca,'DataAspectRatio',[1 1 40000])
view(3)

More About

expand all

Tips

  • If you use contour3m with the globe map display, the contour3m function warns. Make sure to scale the input data relative to the radius of your reference sphere.

Was this topic helpful?