Last active
January 10, 2018 20:00
-
-
Save dipanjanS/727edb3bebbb5b65356a45a6fe104ae4 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 3-D mix data using violin plots | |
| # leveraging the concepts of hue and axes for > 1 categorical dimensions | |
| f, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 4)) | |
| f.suptitle('Wine Type - Quality - Acidity', fontsize=14) | |
| sns.violinplot(x="quality", y="volatile acidity", | |
| data=wines, inner="quart", linewidth=1.3,ax=ax1) | |
| ax1.set_xlabel("Wine Quality",size = 12,alpha=0.8) | |
| ax1.set_ylabel("Wine Volatile Acidity",size = 12,alpha=0.8) | |
| sns.violinplot(x="quality", y="volatile acidity", hue="wine_type", | |
| data=wines, split=True, inner="quart", linewidth=1.3, | |
| palette={"red": "#FF9999", "white": "white"}, ax=ax2) | |
| ax2.set_xlabel("Wine Quality",size = 12,alpha=0.8) | |
| ax2.set_ylabel("Wine Volatile Acidity",size = 12,alpha=0.8) | |
| l = plt.legend(loc='upper right', title='Wine Type') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment