I'm using GeoPandas to create a categorical choropleth of my data. I managed to get the correct colormap applied to the polygon fill but there are tiny slivers between the polygons that I would like to remove. What is the appropriate way to do this? I thought about the following options:
- Apply the same color (same as used for fill) to each polygon line
- Make the lines transparent
- Set the line width to 0
This is my code so far:
fig, ax = plt.subplots() ax.set_xlim(xmin, xmax) ax.set_ylim(ymin , ymax) gdf.plot(ax=ax,column=column,cmap=cmap,categorical=True,linewidth=0) plt.axis('off') fig.savefig(output_filename+".pdf",dpi=300) fig.savefig(output_filename+".jpg",dpi=300)
Gdf is a geodataframe with multiPolygons. The result looks like this. As you can see, there are weird slivers between the polygons. The shapefile does not contain any gaps.