Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions pygmt/src/choropleth.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ def choropleth( # noqa: PLR0913
"""
Plot a choropleth map.

This method fills polygons based on values in a specified data column. It requires
the input data to be a geo-like Python object that implements ``__geo_interface__``
(e.g. a :class:`geopandas.GeoDataFrame`), or an OGR_GMT file containing the
geometry and data to plot.
This method creates a choropleth map by filling each polygon according to an
attribute value. It requires the input data to be a geo-like Python object that
implements ``__geo_interface__`` and includes the values used to fill the polygons
as an attribute field (e.g. a :class:`geopandas.GeoDataFrame`), or an OGR_GMT file
containing the geometry and data to plot.

**Aliases:**

Expand All @@ -61,9 +62,10 @@ def choropleth( # noqa: PLR0913
Parameters
----------
data
A geo-like Python object which implements ``__geo_interface__`` (e.g. a
:class:`geopandas.GeoDataFrame` or :class:`shapely.geometry`), or an OGR_GMT
file containing the geometry and data to plot.
A geo-like Python object which implements ``__geo_interface__`` and includes
the values used to fill the polygons as an attribute field (e.g. a
:class:`geopandas.GeoDataFrame`), or an OGR_GMT file containing the geometry and
data to plot.
column
The name of the data column to use for the fill.
cmap
Expand Down
Loading