geoplot.
polyplot
(df, projection=None, extent=None, figsize=(8, 6), ax=None, edgecolor='black', facecolor='None', **kwargs)¶Trivial polygonal plot.
Parameters: |
|
---|---|
Returns: | The plot axis |
Return type: |
|
Examples
The polyplot can be used to draw simple, unembellished polygons. A trivial example can be created with just a geometry and, optionally, a projection.
import geoplot as gplt
import geoplot.crs as gcrs
gplt.polyplot(boroughs, projection=gcrs.AlbersEqualArea())
However, note that polyplot
is mainly intended to be used in concert with other plot types.
ax = gplt.polyplot(boroughs, projection=gcrs.AlbersEqualArea())
gplt.pointplot(collisions[collisions['BOROUGH'].notnull()], projection=gcrs.AlbersEqualArea(),
hue='BOROUGH', categorical=True,
legend=True, edgecolor='white', linewidth=0.5, legend_kwargs={'loc': 'upper left'},
ax=ax)
Additional keyword arguments are passed to the underlying matplotlib
Polygon patches.
ax = gplt.polyplot(boroughs, projection=gcrs.AlbersEqualArea(),
linewidth=0, facecolor='lightgray')