function varargout = contourm(varargin)
%CONTOURM Project a contour plot of map data.
%
%  CONTOURM(Z,R) creates a contour plot of the regular M-by-N data grid,
%  Z.  R is a referencing matrix or referencing vector. If the current axis
%  is a map axis, the coordinates of Z will be projected using the
%  projection structure from the axis. The contours are drawn at their
%  corresponding Z level.
%
%  CONTOURM(LAT, LON, Z) displays a contour plot of the geolocated M-by-N
%  data grid, Z.  LAT and LON can be the size of Z or can specify the 
%  corresponding row and column dimensions for Z.
%
%  CONTOURM(Z, R, N) or CONTOURM(LAT, LON, N) where N is a scalar, draws N
%  contour levels.
%
%  CONTOURM(Z, R, V) or CONTOURM(LAT, LON, V) where V is a vector, draws 
%  contours at the levels specified by the input vector V. Use V = [v v] to 
%  compute a single contour at level v. 
%
%  CONTOURM(..., LINESPEC) uses any valid LineSpec string to draw the 
%  contour lines.
%
%  CONTOURM(..., PROP1, VAL1, PROP2, VAL2,...) specifies property/value
%  pairs that modify CONTOURGROUP graphics properties. Property names can
%  be abbreviated and are case-insensitive.
%
%  C = CONTOURM(...) returns a standard contour matrix, C, with the first
%  row representing longitude data and the second row representing latitude
%  data.
%
%  [C,H] = CONTOURM(...) returns the contour matrix and the handle
%  to the contour patches drawn onto the current axes. The handle is type
%  hggroup.
%
%
%  % Example 1
%  % ---------
%  % Contour the EGM96 geoid heights as dotted lines and with 10 levels
%  % and set the contour labels on.
%  load geoid
%  figure
%  contourm(geoid, geoidrefvec, 10, ':', 'ShowText', 'on');
%  xlabel('Longitude');
%  ylabel('Latitude');
%
%
%  % Example 2
%  % ---------
%  % Contour the Korean bathymetry and elevation data. 
%
%  % Load the data.
%  load korea;                                                                
%  load geoid;                                                                
%
%  % Create a worldmap of Korea. 
%  figure
%  worldmap(map, refvec);                                             
%
%  % Display the digital elevation data and colormap.
%  geoshow(map, refvec, 'DisplayType', 'surface');
%  colormap(demcmap(map));
%
%  % Contour the geoid values from -100 to 100 in increments of 5.
%  [c,h] = contourm(geoid, geoidlegend, -100:5:100, 'k');                         
%
%  % Add red labels to the contours. 
%  ht=clabel(c,h);
%  set(ht,'Color','r');                                       
%
%  % Hide the axes.
%  hidem(gca);             
%
%
%  % Example 3
%  % -----------
%  % Contour the geoid and topography heights.
%
%  % Load the data.
%  load topo
%  load geoid
%
%  % Create a Miller projection with geoid contours as red lines,
%  % and topography contours as black lines.
%  figure; axesm miller
%  hold on
%  contourm(geoid, geoidrefvec, 'r');
%  contourm(topo,  topolegend, 'k'); 
%  
%  % Add the topograpy surface and color map.
%  geoshow(topo, topolegend, 'DisplayType', 'surface')
%  colormap(demcmap(topo))
%  
%  % Set the surface as the lowest value of topo
%  % to keep the contour lines visible.
%  zdatam(handlem('surface'), min(topo(:)))
%
%  % Add a title
%  title('Contour Plot of Topography and Geoid Heights');
%
%  See also CLABELM, CONTOUR, CONTOUR3, CONTOUR3M, GEOSHOW, PLOT.

%  Copyright 1996-2004 The MathWorks, Inc.
%  $Revision: 1.3.4.3 $    $Date: 2004/12/18 07:41:50 $

% Check inputs and calcuate the contour.
varargout = calcContour(mfilename, @contour, nargout, varargin{:});


