Skip to content

Instantly share code, notes, and snippets.

@cereniyim
Created January 8, 2020 13:05
Show Gist options
  • Save cereniyim/4f79f0be621aea569f81b8fb11452564 to your computer and use it in GitHub Desktop.
Save cereniyim/4f79f0be621aea569f81b8fb11452564 to your computer and use it in GitHub Desktop.
KDE plot with wilderness area
# distribution of the cover type in different wilderness areas
figsize(14,10)
# plot cover_type distribution for each wilderness area
for area in wilderness_areas:
subset = trees[trees['Wilderness_Area_Type'] == area]
sns.kdeplot(subset["Cover_Type"], label=area, linewidth=2)
# set title, legends and labels
plt.ylabel("Density")
plt.xlabel("Cover_Type")
plt.title("Density of Cover Types Among Different Wilderness Areas", size=14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment