Skip to content

Instantly share code, notes, and snippets.

@ishritam
Created October 9, 2019 07:23
Show Gist options
  • Save ishritam/5b2142783e7a1d1c37bf4b4d5e4fd5d4 to your computer and use it in GitHub Desktop.
Save ishritam/5b2142783e7a1d1c37bf4b4d5e4fd5d4 to your computer and use it in GitHub Desktop.
2-D Scatter plot with color
# 2-D Scatter plot with color-coding for each flower type/class.
# Here 'sns' corresponds to seaborn.
sns.set_style("whitegrid");
sns.FacetGrid(iris, hue="species", size=4) \
.map(plt.scatter, "sepal_length", "sepal_width") \
.add_legend();
plt.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment