I have seen this question where labels are added to polygons and they appear inside each polygon. I am trying to accomplish the same thing, but I am using a different format and can“t see how to apply the same method to my case.
My polygons are like this:
import geopandas as gpd
from shapely.geometry import Polygon
boundary = gpd.GeoSeries({
'foo': Polygon([(5, 5), (5, 13), (13, 13), (13, 5)]),
'bar': Polygon([(20, 20), (40, 20), (40, 30), (20, 30)]),
})
boundary.plot(cmap="Greens")
plt.show()
Any idea how to make each polygon have a label?