function chesapeake_bay ( )

%*****************************************************************************80
%
%% CHESAPEAKE_BAY displays a map of the Chesapeake Bay region.
%
%  Discussion:
%
%    This program is an example from the MATLAB Mapping Toolbox User's Guide.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    23 June 2016
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'CHESAPEAKE_BAY:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Display a map of the Chesapeake Bay region.\n' );
%
%  Define the plotting region in terms of latitude and longitude ranges.
%
  latlim = [ 37, 40 ];
  lonlim = [ -78, -74 ];

  figure

  ax = usamap ( latlim, lonlim )
%
%  Suppress the display of the latitude and longitude axes labels.
%
  axis off
%
%  SHAPEREAD() reads the shapes of the US states.
%
  states = shaperead ( 'usastatehi', ...
    'UseGeoCoords', true, ...
    'BoundingBox', [ lonlim', latlim' ] );
%
%  Make a symbolspec, so that we can create a political map using polcmap.
%
  faceColors = makesymbolspec ( 'Polygon', ...
    { 'INDEX', [ 1 numel(states) ], 'FaceColor', polcmap(numel(states)) } );
%
%  Display the filled polygons representing states.
%
  geoshow ( ax, states, 'SymbolSpec', faceColors );
%
%  Display the name of each state whose natural label position is
%  within the current axes limits.
%
  for k = 1 : numel(states)

    labelPointIsWithinLimits = ...
      latlim(1) < states(k).LabelLat &&...
      latlim(2) > states(k).LabelLat &&...
      lonlim(1) < states(k).LabelLon &&...
      lonlim(2) > states(k).LabelLon;

    if ( labelPointIsWithinLimits )
      textm ( states(k).LabelLat, ...
        states(k).LabelLon, states(k).Name, ...
        'HorizontalAlignment', 'center' )
    end

  end
%
%  Place a label for the Chesapeake Bay in the open water region.
%
  textm ( 38.2, -76.1, ' Chesapeake Bay ',...
    'fontweight', 'bold', ...
    'Rotation', 270 )
%
%  Save a copy of the plot.
%
  print ( '-dpng', 'chesapeake_bay.png' )

  return
end
