Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import seaborn as sns
  3.  
  4. wavg = movies_ranked.sort_values('weighted_average', ascending=False)
  5.  
  6. plt.figure(figsize=(16,6))
  7.  
  8. ax = sns.barplot(x=wavg['weighted_average'].head(10), y=wavg['original_title'].head(10), data=wavg, palette='deep')
  9.  
  10. plt.xlim(6.75, 8.35)
  11. plt.title('"Best" Movies by TMDB Votes', weight='bold')
  12. plt.xlabel('Weighted Average Score', weight='bold')
  13. plt.ylabel('Movie Title', weight='bold')
  14.  
  15. plt.savefig('best_movies.png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement