skillfed

basemap

Plot data on map projections with matplotlib

basemap v2.0.0 105.0K downloads/30d#12,725 on PyPI815
Permissive license MIT Active released

What it is and what it does

Basemap is a matplotlib toolkit for plotting data on map projections. It wraps geographic functionality—coastlines, political boundaries, coordinate transformations—around matplotlib's plotting engine, letting you render scientific and geographic data directly onto maps with support for various projections. The package depends on numpy, matplotlib, pyproj for coordinate system handling, and pyshp for shapefile support, plus basemap-data for essential map assets.

It's used when you need to visualize spatial data on actual geographic coordinates rather than abstract Cartesian grids. The library handles projection mathematics and provides ready-made geographic features so you can focus on your data layer. Installation is straightforward via pip with precompiled wheels available for current Python versions.

Use it for:

  • Plot weather or climate data on geographic maps with proper projections
  • Visualize seismic events or geological survey data on regional or global maps
  • Create publication-quality maps for scientific papers with coastlines and borders
  • Display GPS trajectories or ship routes on map projections
  • Generate maps showing regional statistics by country or state

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Basemap renders geographic data on matplotlib figures using map projections, with built-in coastlines and political boundaries.

Yes, if you need to plot scientific or geographic data on real map projections with matplotlib. The package is actively maintained, has no known vulnerabilities, and offers straightforward installation via precompiled wheels. Medium install friction is acceptable for the functionality gained. Not necessary if you only need simple lat/lon scatter plots.

Install

basemap on PyPI

pip

pip install basemap

uv

uv add basemap

poetry

poetry add basemap

Installing basemap

Before you install

Medium install friction due to compiled dependencies. Precompiled wheels available for Windows, macOS (Intel and ARM), and Linux across Python 3.9 through 3.13. Actively maintained with last commit 2026-05-04.

License in practice

MIT license for the library; GEOS dynamic library bundled with wheels is LGPL-2.1-only. Permissive licensing allows commercial and private use with attribution.

Quickstart

import basemap
import matplotlib.pyplot as plt
import numpy

# Create a Basemap instance with desired projection
# Add geographic features and plot data
plt.show()

Requires basemap-data package for basic map assets; optional basemap-data-hires for high-resolution data.

Verify before relying

  • Specific syntax and parameters for common projection types and coordinate transformations
  • Performance characteristics with large datasets or high-resolution projections
  • Current status and usage of optional OWSLib integration for wmsimage method
  • Details on fillcontinents workaround using drawlsmask method

Package facts

License MIT (permissive)
Python support supports the current Python release (<3.14,>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 6 — basemap_data, packaging, numpy, matplotlib, pyproj, pyshp
Maintenance actively maintained — 427 days since the last release
Last repo commit
First released
Downloads 105,043/month — #12,725 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: basemap-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl; basemap-2.0.0-cp310-cp310-macosx_11_0_arm64.whl; basemap-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; basemap-2.0.0-cp310-cp310-win_amd64.whl; basemap-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl; basemap-2.0.0-cp311-cp311-macosx_11_0_arm64.whl; basemap-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; basemap-2.0.0-cp311-cp311-win_amd64.whl; basemap-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl; basemap-2.0.0-cp312-cp312-macosx_11_0_arm64.whl; basemap-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; basemap-2.0.0-cp312-cp312-win_amd64.whl; basemap-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl; basemap-2.0.0-cp313-cp313-macosx_11_0_arm64.whl; basemap-2.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; basemap-2.0.0-cp313-cp313-win_amd64.whl; basemap-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl; basemap-2.0.0-cp39-cp39-macosx_11_0_arm64.whl; basemap-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; basemap-2.0.0-cp39-cp39-win_amd64.whl

Keywords: GIS, maps, plots

Development Status :: 5 - Production/StableIntended Audience :: EducationIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: Libraries :: Python Modules

Tags

matplotlib map projectionsgeographic plottingcoastlines and boundariescartographic visualizationGIS mapping librarymap rendering pythonprojection-based plotting
cartographygeospatialmatplotlib-extension

More Python Modules packages