Created
January 10, 2018 21:15
-
-
Save dipanjanS/c765c998d543afc6664fe1214f360191 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 bubble plots | |
# leveraging the concepts of hue and size | |
size = wines['residual sugar']*25 | |
fill_colors = ['#FF9999' if wt=='red' else '#FFE888' for wt in list(wines['wine_type'])] | |
edge_colors = ['red' if wt=='red' else 'orange' for wt in list(wines['wine_type'])] | |
plt.scatter(wines['fixed acidity'], wines['alcohol'], s=size, | |
alpha=0.4, color=fill_colors, edgecolors=edge_colors) | |
plt.xlabel('Fixed Acidity') | |
plt.ylabel('Alcohol') | |
plt.title('Wine Alcohol Content - Fixed Acidity - Residual Sugar - Type',y=1.05) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment