Create axesm-based map for world region (2024)

Create axesm-based map for world region

collapse all in page

Syntax

worldmap region

worldmap(region)

worldmap

worldmap(latlim,lonlim)

worldmap(Z,R)

h = worldmap(___)

Description

example

worldmap region or worldmap(region) sets up an empty axesm-based map (previously referred to as map axes) with projection and limits suitable to the part of the world specified in region.

worldmap with no arguments presents a menu from which you can select the name of a single continent, country, island, or region.

worldmap(latlim,lonlim) allows you to define a custom geographic region in terms of its latitude and longitude limits in degrees.

worldmap(Z,R) derives the map limits from the extent of a regular data grid, Z, georeferenced by R.

h = worldmap(___) returns the handle of the axesm-based map.

Examples

collapse all

Set up World Map and Draw Coastlines

Open Live Script

Set up a world map and draw coarse coastlines.

worldmap('World')load coastlinesplotm(coastlat,coastlon)

Create axesm-based map for world region (1)

Create World Map with Land Areas, Lakes, and Other Landmarks

Open Live Script

Read and display land areas, major lakes and rivers, cities, and populated places on a world map.

ax = worldmap("World");setm(ax,"Origin",[0 180 0])land = readgeotable("landareas.shp");geoshow(ax,land,"FaceColor",[0.5 0.7 0.5])lakes = readgeotable("worldlakes.shp");geoshow(lakes,"FaceColor","blue")rivers = readgeotable("worldrivers.shp");geoshow(rivers,"Color","blue")cities = readgeotable("worldcities.shp");geoshow(cities,"Marker",".","Color","red")

Create axesm-based map for world region (2)

Create Map of Antarctica

Open Live Script

Read world land areas as a geospatial table. Extract the table row containing Antarctica.

GT = readgeotable("landareas.shp");row = GT.Name == "Antarctica";ant = GT(row,:);

Display Antarctica on a map with an appropriate projection.

worldmap("antarctica")geoshow(ant)

Create axesm-based map for world region (3)

Create Map of Africa and India with Major Cities

Open Live Script

Read world land areas and cities as geospatial tables. Create a world map appropriate for Africa and India. Then, display the land areas and cities on the map

land = readgeotable("landareas.shp");cities = readgeotable("worldcities.shp");worldmap(["Africa" "India"])geoshow(land,"FaceColor",[0.15 0.5 0.15])geoshow(cities,"Marker",".","Color","red")

Create axesm-based map for world region (4)

Display Geoid Heights Over South America and Central Pacific

Open Live Script

Display geoid heights from the EGM96 geoid model over a map of South America and the central Pacific. First, get geoid heights and a geographic postings reference object. Load coastline latitude and longitude data.

[N,R] = egm96geoid;load coastlines

Create a world map by specifying latitude and longitude limits. Then, display the geoid heights and coastline data.

latlim = [-50 50];lonlim = [160 -30];worldmap(latlim,lonlim)geoshow(N,R,'DisplayType','surface')geoshow(coastlat,coastlon,'Color','k')

Create axesm-based map for world region (5)

Display Map of Terrain Elevations in Korea

Open Live Script

Load elevation data and a geographic cells reference object for the Korean peninsula. Create a world map with appropriate latitude and longitude limits. Then, display the data as a texture map using geoshow. Apply a colormap appropriate for elevation data using demcmap.

load korea5cworldmap(korea5c,korea5cR);geoshow(korea5c,korea5cR,'DisplayType','texturemap')demcmap(korea5c)

Create axesm-based map for world region (6)

Map the United States of America Coloring State Polygons

Open Live Script

Create a map of the United States of America. Display the states using a palette of random, muted colors.

worldmap("USA");load coastlinesgeoshow(coastlat,coastlon, ... "DisplayType","polygon","FaceColor",[0.45 0.60 0.30])states = readgeotable("usastatelo.shp");h = height(states);faceColors = makesymbolspec("Polygon", ... {'INDEX',[1 h],'FaceColor',polcmap(h)});geoshow(states,"DisplayType","polygon", ... "SymbolSpec",faceColors)

Create axesm-based map for world region (7)

Input Arguments

collapse all

regionRegion to display
'World' | 'North Pole' | 'South Pole' | 'Pacific' | character vector | string scalar | string array | cell array of character vectors

Region to display, specified as a string scalar, string array, character vector, or cell array of character vectors. Permissible values include names of continents, countries, and islands as well as 'World', 'North Pole', 'South Pole', and 'Pacific'.

Example: {'Africa','India'}

latlimLatitude limits
two-element vector

Latitude limits, specified as a two-element vector of the form [southern_limit northern_limit].

lonlimLongitude limits
two-element vector

Longitude limits, specified as a two-element vector of the form [western_limit eastern_limit].

ZData grid
M-by-N array

Data grid, specified as an M-by-N array. Z is a regular data grid associated with a geographic reference R.

RGeographic reference
geographic raster reference object | vector | matrix

Geographic reference, specified as one of the following.

TypeDescription
Geographic raster reference object

GeographicCellsReference or GeographicPostingsReference geographic raster reference object. The RasterSize property must be consistent with the size of the data grid, size(Z).

Vector

1-by-3 numeric vector with elements:

[cells/degree northern_latitude_limit western_longitude_limit]
Matrix

3-by-2 numeric matrix that transforms raster row and column indices to or from geographic coordinates according to:

[lon lat] = [row col 1] * R

R defines a (non-rotational, non-skewed) relationship in which each column of the data grid falls along a meridian and each row falls along a parallel.

For more information about referencing vectors and matrices, see Georeferenced Raster Data.

Output Arguments

collapse all

h — Handle of the axesm-based map
handle object

Handle of the axesm-based map, returned as a handle object.

Tips

  • All axes created with worldmap are initialized with a spherical Earth model having a radius of 6,371,000 meters.

  • worldmap uses tightmap to adjust the axes limits around the map. If you change the projection, or just want more white space around the map frame, use tightmap again or auto axis.

Version History

Introduced before R2006a

See Also

axesm | framem | geoshow | gridm | mlabel | plabel | tightmap | usamap

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Create axesm-based map for world region (8)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

Contact your local office

Create axesm-based map for world region (2024)
Top Articles
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6596

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.