function h = worldmap(varargin)
%WORLDMAP Construct a map axes for a given region of the world.
%
%   WORLDMAP REGION or WORLDMAP(REGION) sets up an empty map axes with
%   projection and limits suitable to the part of the world specified in
%   REGION.  REGION may be a string or a cell array of strings.
%   Permissible strings include names of continents and countries as well
%   as 'World', 'North Pole', 'South Pole', and 'Pacific'.
%
%   WORLDMAP with no arguments presents a menu of region names from which
%   to choose.
%   
%   WORLDMAP(LATLIM, LONLIM) allows you to define a custom geographic
%   region in terms of its latitude and longitude limits in degrees. LATLIM
%   and LONLIM are two-element vectors of the form [southern_limit
%   northern_limit] and [western_limit eastern_limit], respectively.
%   
%   WORLDMAP(Z, R) derives the map limits from the extent of a regular data
%   grid or georeferenced image Z, with 3-by-2 referencing matrix or 1-by-3
%   referencing vector R.
%  
%   H = WORLDMAP(...) returns the handle of the map axes.
%  
%   For cylindrical projections, WORLDMAP uses TIGHTMAP set the axis limits
%   tight around the map. If you change the projection, or just want more
%   white space around the map frame, use TIGHTMAP again or AXIS AUTO.
%
%   Example 1
%   ---------
%   % World map with coarse coastlines
%   worldmap('World')
%   load coast
%   plotm(lat, long)
%
%   Example 2
%   ---------
%   % Worldmap with land areas, major lakes and rivers, and cities and
%   % populated places
%   ax = worldmap('World');
%   setm(ax, 'Origin', [0 180 0])
%   land = shaperead('landareas', 'UseGeoCoords', true);
%   geoshow(ax, land, 'FaceColor', [0.5 0.7 0.5])
%   lakes = shaperead('worldlakes', 'UseGeoCoords', true);
%   geoshow(lakes, 'FaceColor', 'blue')
%   rivers = shaperead('worldrivers', 'UseGeoCoords', true);
%   geoshow(rivers, 'Color', 'blue')
%   cities = shaperead('worldcities', 'UseGeoCoords', true);
%   geoshow(cities, 'Marker', '.', 'Color', 'red')
%
%   Example 3
%   ---------
%   % Map of Antarctica
%   worldmap('antarctica')
%   antarctica = shaperead('landareas', 'UseGeoCoords', true,...
%       'Selector',{@(name) strcmp(name,'Antarctica'), 'Name'});
%   patchm(antarctica.Lat, antarctica.Lon, [0.5 1 0.5])
%
%   Example 4
%   ---------
%   % Map of Africa and India with major cities and populated places
%   worldmap({'Africa','India'})
%   land = shaperead('landareas.shp', 'UseGeoCoords', true);
%   geoshow(land, 'FaceColor', [0.15 0.5 0.15])
%   cities = shaperead('worldcities', 'UseGeoCoords', true);
%   geoshow(cities, 'Marker', '.', 'Color', 'blue')
%
%   Example 5
%   ---------
%   % Map of the geoid over South America and the central Pacific
%   worldmap([-50 50],[160 -30])
%   load geoid
%   geoshow(geoid, geoidrefvec, 'DisplayType', 'texturemap');
%   load coast
%   geoshow(lat, long)
%
%   Example 6
%   ---------
%   % Map of terrain elevations in Korea
%   load korea
%   h = worldmap(map, refvec);
%   set(h, 'Visible', 'off')
%   geoshow(h, map, refvec, 'DisplayType', 'texturemap')
%   colormap(demcmap(map))
%
%   Example 7
%   ---------
%   % Map of the United States of America
%   ax = worldmap('USA');
%   load coast
%   geoshow(ax, lat, long,...
%       'DisplayType', 'polygon', 'FaceColor', [.45 .60 .30])
%   states = shaperead('usastatelo', 'UseGeoCoords', true);
%   for k = 1:numel(states)
%       states(k).Number = k;
%   end
%   faceColors = makesymbolspec('Polygon',...
%       {'Number', [1 numel(states)], 'FaceColor', polcmap(numel(states))});
%   geoshow(ax, states, 'DisplayType', 'polygon', 'SymbolSpec', faceColors)
%
%   See also AXESM, FRAMEM, GEOSHOW, GRIDM, MLABEL, PLABEL, TIGHTMAP, USAMAP.

%   Copyright 1996-2004 The MathWorks, Inc.
%   $Revision: 1.11.4.2 $ $Date: 2004/12/18 07:46:14 $ 

ax = regionmap(mfilename, varargin{:});

% Avoid command-line output if no output variable is specified.
if nargout == 1
    h = ax;
end
