Skip to content

Instantly share code, notes, and snippets.

@OlgaEle
Created March 22, 2022 18:03
Show Gist options
  • Select an option

  • Save OlgaEle/c6604cbc14712d7b72ea73480aeea614 to your computer and use it in GitHub Desktop.

Select an option

Save OlgaEle/c6604cbc14712d7b72ea73480aeea614 to your computer and use it in GitHub Desktop.
import seaborn as sns
import matplotlib.pyplot as plt
#Kernel Density Plot
plt.figure(figsize = (12,6))
sns.kdeplot(data = df[df.stroke == 1],
x = 'age', shade = True, color = 'purple', alpha = 1)
sns.kdeplot(data = df[df.stroke == 0],
x = 'age', shade = True, color = 'darkcyan', alpha = 0.7)
plt.xlabel("Age", fontsize = 15,font = 'monospace')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment