Created
August 20, 2024 15:58
-
-
Save jtrive84/2593557d78f5e5a77b1dc79cd8466f3e to your computer and use it in GitHub Desktop.
Color polygons with NA as white with black borders.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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