Created
January 10, 2018 21:29
-
-
Save dipanjanS/f141ae7ebf2538869f9c0fe1d67014b3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Visualizing 4-D mix data using scatter plots | |
# leveraging the concepts of hue and facets for > 1 categorical attributes | |
g = sns.FacetGrid(wines, col="wine_type", hue='quality_label', | |
col_order=['red', 'white'], hue_order=['low', 'medium', 'high'], | |
aspect=1.2, size=3.5, palette=sns.light_palette('navy', 4)[1:]) | |
g.map(plt.scatter, "volatile acidity", "alcohol", alpha=0.9, | |
edgecolor='white', linewidth=0.5, s=100) | |
fig = g.fig | |
fig.subplots_adjust(top=0.8, wspace=0.3) | |
fig.suptitle('Wine Type - Alcohol - Quality - Acidity', fontsize=14) | |
l = g.add_legend(title='Wine Quality Class') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment