Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created November 10, 2020 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/695ac02304ee376f284974766455e13a to your computer and use it in GitHub Desktop.
Save amankharwal/695ac02304ee376f284974766455e13a to your computer and use it in GitHub Desktop.
# Create another figure
plt.figure(figsize=(10, 8))
# Scatter with postivie examples
plt.scatter(df.age[df.target==1],
df.thalach[df.target==1],
c="salmon")
# Scatter with negative examples
plt.scatter(df.age[df.target==0],
df.thalach[df.target==0],
c="lightblue")
# Add some helpful info
plt.title("Heart Disease in function of Age and Max Heart Rate")
plt.xlabel("Age")
plt.ylabel("Max Heart Rate")
plt.legend(["Disease", "No Disease"]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment