Introduction#

The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python. It is similar in functionality to GrADS, GMT, the MATLAB Mapping Toolbox and the IDL Mapping Facilities. CDAT and PyNGL are other Python libraries with similar capabilities.

Basemap does not plot on its own, but provides the facilities to transform coordinates to one of 25 different map projections (using pyproj and therefore the PROJ C library). Then matplotlib is used to plot contours, images, vectors, lines or points in the transformed coordinates. Shoreline, river and political boundary datasets (extracted from GMT) are provided, together with methods for plotting them. The GEOS library is used internally to clip the coastline and political boundary features to the map projection region.

Basemap is geared towards the needs of Earth scientists, particularly oceanographers and meteorologists. Jeff Whitaker originally wrote Basemap to help in his research (climate and weather forecasting), since at the time CDAT was the only other tool in Python for plotting data on map projections. Over the years, the capabilities of basemap have evolved as scientists in other disciplines (such as biology, geology and geophysics) requested and contributed new features.