Guest User

Untitled

a guest
Jan 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # Visualizing 4-D mix data using bubble plots
  2. # leveraging the concepts of hue and size
  3. size = wines['residual sugar']*25
  4. fill_colors = ['#FF9999' if wt=='red' else '#FFE888' for wt in list(wines['wine_type'])]
  5. edge_colors = ['red' if wt=='red' else 'orange' for wt in list(wines['wine_type'])]
  6.  
  7. plt.scatter(wines['fixed acidity'], wines['alcohol'], s=size,
  8. alpha=0.4, color=fill_colors, edgecolors=edge_colors)
  9.  
  10. plt.xlabel('Fixed Acidity')
  11. plt.ylabel('Alcohol')
  12. plt.title('Wine Alcohol Content - Fixed Acidity - Residual Sugar - Type',y=1.05)
Add Comment
Please, Sign In to add comment