Main Content

contourfm

Project filled 2-D contour plot of map data

Description

The contourfm function is the same as the contourm function except that the areas between contours are filled with colors. For each contour interval, contourfm selects a distinct color from the figure's colormap. You can obtain the same result by setting 'Fill','on' and 'LineColor','black' when calling contourm.

Examples

collapse all

Get geoid heights and a geographic postings reference object from the EGM96 geoid model. Load coastline latitude and longitude data.

[N,R] = egm96geoid;
load coastlines

Create a filled contour plot of the geoid data on a world map. Plot the coastline data using geoshow and display a colorbar for the contour plot using contourcbar.

worldmap('world')
levels = -120:20:100;
contourfm(N,R,levels,'LineStyle','none')
geoshow(coastlat,coastlon,'Color','k')
contourcbar

Introduced before R2006a