MATLAB Examples

basins Antarctic Drainage Basin Plotter

The basins function outlines Antarctic drainage basins on a map. This function is provided as a plugin to the Antarctic Mapping Tools package.



h = basins(...)
[~,lat,lon] = basins(...)


basins outlines all full (including floating) drainage divides.

basins(basintype) outlines 'grounded' or 'full' drainage divides. Default value is 'full'.

basins(...,basin) outlines only the basin specified. This can be any number from 1 to 27 or 'all'.

basins(...,'labels','on') labels the drainage basins by their number.

basins(...,varagin) formats the linestyle or text style of the outline and labels.

h = basins(...) returns a handle h of plotted lines.

[~,lat,lon] = basins(...) returns the lat/lon coordinates of a given drainage basin divide. If no map is current or if you do not have the Mapping Toolbox, lat and lon arrays of the basin perimeter may still be returned (e.g.: [~,lat,lon] = basins('grounded',5); )


The first time you use basins, you'll need to run basins_install. It will try to do all the work for you. The installation script takes about 30 seconds to run on a modern laptop computer.

Example 1: Full


Example 2: A single grounded basin, formatted and labeled

This example uses the Bedmap2 Toolbox for Matlab.

bedmap2 gl
basins('grounded',4,'color',[1 .2 .2],'labels','on','fontsize',20)

Example 3: Use basin perimeters to patch a basin

[~,lat2,lon2] = basins('full',2);   % gets coordinates of basin 2
patchm(lat2,lon2,[.3 .6 .7])        % creates a patch of basin 2
[~,lat11,lon11] = basins('full',11);% gets coordinates of basin 11
patchm(lat11,lon11,'r')             % creates a patch of basin 2
basins('full','all','labels','on')  % outlines & labels all basins

Example 4: Mimic Rignot et al.

Here we use the measures function and rgbmap to mimic a well known figure from Rignot et al.'s 2011 Ice Flow of the Antarctic Ice Sheet. As you see, the basins command is simple. Getting the colorbar tick labels to work with a log scale is the tricky part.

measures speed

% Fix colors and colorbar:
rgbmap('pinkish brown','tan','light yellow','light grass green',...
    'aqua','dark blue','magenta','red',455);
cb = colorbar;
set(cb,'location','north','position',[.15 .9 .35 .04],...
    'xtick',[log10(1.5) 1 2 3]','xticklabel',{num2str([1.5 10 100 1000]')},...
xlabel(cb,'velocity magnitude [m/yr]')

About this data

Drainage basins boundaries are from Goddard Space Flight Center. Data were generated by Zwally, H. Jay, Mario B. Giovinetto, Matthew A. Beckley, and Jack L. Saba, 2012, Antarctic and Greenland Drainage Systems, GSFC Cryospheric Sciences Laboratory.

About this function

This function and supporting documentation were written by Chad A. Greene of the University of Texas Institute for Geophysics, August 2014.