skillfed

descartes

Use geometric objects as matplotlib paths and patches

descartes v1.1.0 676.4K downloads/30d#5,383 on PyPI
Permissive license BSD Abandoned released

What it is and what it does

Descartes is an adapter layer that converts geometric objects and GeoJSON-like dictionaries into matplotlib patch objects for visualization. It bridges geometric computation and matplotlib's rendering system, allowing you to plot spatial data directly without manual coordinate extraction. The package accepts objects with a `__geo_interface__` property or compatible geometric structures and converts them into matplotlib patches that can be added to axes.

The package is stable and has been in production use since 2010, but it is no longer actively maintained—the last release was in 2017. It has no known security vulnerabilities and carries a permissive BSD license. Its single runtime dependency is matplotlib, with numpy as an implicit requirement.

Use it for:

  • Plot geometric objects directly on matplotlib figures without manual coordinate extraction.
  • Visualize GeoJSON geometries in Python by converting them to matplotlib patches for display.
  • Create spatial plots where you want to leverage geometric operations and matplotlib's rendering.
  • Render transformed geometries as colored patches with transparency and styling.
  • Build exploratory plots of spatial data without writing custom coordinate-to-patch conversion code.

Worth the install?

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

Converts geometric objects and GeoJSON-like data into matplotlib patches and paths for visualization on plots.

Yes, if you are working with geometric objects and matplotlib in a stable codebase where you do not expect frequent updates. The package is mature and does one thing well, but its abandonment since 2017 means you should verify compatibility with your current matplotlib and Python versions before adopting it in new projects.

Install

descartes on PyPI

pip

pip install descartes

uv

uv add descartes

poetry

poetry add descartes

Installing descartes

Before you install

Low install friction with pure Python wheels available. However, the package is abandoned—last release was in 2017, over 3496 days ago. No recent maintenance or updates; use only if existing functionality meets your needs.

License in practice

BSD license (permissive) places no significant restrictions on use, modification, or distribution in most contexts.

Quickstart

pip install descartes matplotlib

from matplotlib import pyplot
from descartes import PolygonPatch

patch = PolygonPatch({'type': 'Polygon', 'coordinates': [[(0, 0), (1, 0), (1, 1), (0, 1), (0, 0)]]}, fc='blue', alpha=0.5)
ax = pyplot.gca()
ax.add_patch(patch)
pyplot.show()

Requires matplotlib; numpy is an implicit dependency. Shapely 1.2+ is optional but typically used for geometric operations.

Verify before relying

  • Whether the package works reliably with current versions of matplotlib and numpy given its 2017 release date.
  • Compatibility with modern Python versions beyond what classifiers declare.
  • Whether active alternatives exist for this use case in the current ecosystem.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — matplotlib
Maintenance abandoned — 3,496 days since the last release
First released
Downloads 676,373/month — #5,383 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: descartes-1.1.0-py2-none-any.whl; descartes-1.1.0-py3-none-any.whl

Keywords: matplotlib, gis, geojson, geometry

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Scientific/Engineering :: GIS

Tags

geometry matplotlib patchesgeojson visualization matplotlibgeometric shapes plottingmatplotlib patch conversiongis data visualizationpolygon rendering matplotlibgeometry plotting library
geospatialvisualizationmatplotlib-integration

More GIS packages