Skip to content

Instantly share code, notes, and snippets.

@deansublett
Created June 5, 2019 17:58
Show Gist options
  • Save deansublett/4a31939e1998636a18bc729591d30f77 to your computer and use it in GitHub Desktop.
Save deansublett/4a31939e1998636a18bc729591d30f77 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import seaborn as sns
wavg = movies_ranked.sort_values('weighted_average', ascending=False)
plt.figure(figsize=(16,6))
ax = sns.barplot(x=wavg['weighted_average'].head(10), y=wavg['original_title'].head(10), data=wavg, palette='deep')
plt.xlim(6.75, 8.35)
plt.title('"Best" Movies by TMDB Votes', weight='bold')
plt.xlabel('Weighted Average Score', weight='bold')
plt.ylabel('Movie Title', weight='bold')
plt.savefig('best_movies.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment