Skip to content

Instantly share code, notes, and snippets.

@jtrive84
Created August 20, 2024 15:58
Show Gist options
  • Save jtrive84/2593557d78f5e5a77b1dc79cd8466f3e to your computer and use it in GitHub Desktop.
Save jtrive84/2593557d78f5e5a77b1dc79cd8466f3e to your computer and use it in GitHub Desktop.
Color polygons with NA as white with black borders.
fig, ax = plt.subplots(figsize=(10, 8), tight_layout=True)
ax.set_title("SAM claims by county", fontsize=10)
dd.plot(
ax=ax, column="n", edgecolor="black", linewidth=.50,
cmap="rainbow", alpha=1, legend=True,
legend_kwds={"label": "number of claims", "orientation": "vertical", "shrink": .35},
missing_kwds={"facecolor": "#FFFFFF", "edgecolor": "#000000", "linewidth": .25}
)
ax.axis("off")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment