Documentation of fill_oceanmap

Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)

Function Synopsis

hh = fill_oceanmap(lev, colr);

Help text

  hh = fill_oceanmap(lev, colr);

  Adds an ocean mask to the given plot, at the elevation
  specified by 'lev', and color 'colr'.
  As with fill_landmap, 'lev' may be 'over', 'under', 
  'o', 'u', or a scalar indicating the z-level that the 
  map should be drawn at.

  'colr' may be a color string, or a 3 element vector.

Cross-Reference Information

This function calls This function is called by

Listing of function fill_oceanmap

function hh = fill_oceanmap(lev, colr);

load oceanlo;
numpatch = length(oceanmask);

  if nargin < 2; colr = 0.7; end;
  if nargin < 1; lev = 'over'; end;
  if isstr(lev);
    child = get(gca, 'Children');
    plotlev = [0 0];
    for i = 1:length(child);
      zd = get(child(i), 'ZData');
      plotlev(1) = max([plotlev(1); zd(:)]);
      plotlev(2) = min([plotlev(2); zd(:)]);
    if strcmp(lev(1), 'o');
      lev = plotlev(1)+1;
    elseif strcmp(lev(1), 'u');
      lev = plotlev(2)-1;
      error('lev must be over, under, or a scalar');

if ~isstr(colr);
    if isscalar(colr); colr = colr*[1 1 1]; end;

global FRAME; tol = 5e5*epsm;
latlim = FRAME(3:4)+[-1 1]*tol;
hout = [];
for i = 1:numpatch;
    lat = oceanmask(i).lat;
    lon = oceanmask(i).long;
    [lat2, lon2] = maptrimp2(lat, eastof(lon, FRAME(1)), latlim, FRAME(1:2));
    if any(~isnan(lat2));
        htem = patchm(lat2, lon2, lev, colr);
        hout = [hout htem];
set(hout, 'edgecolor', 'none');

if nargout == 1;
    hh = hout;