Skip to content

Instantly share code, notes, and snippets.

@WalkerHarrison
Last active April 7, 2017 20:19
Show Gist options
  • Save WalkerHarrison/0839a0d38c2066739d420dbeb8d6cdc1 to your computer and use it in GitHub Desktop.
Save WalkerHarrison/0839a0d38c2066739d420dbeb8d6cdc1 to your computer and use it in GitHub Desktop.
combo = ' '.join(searches)
freqs = Counter(combo.split())
top = freqs.most_common(40)
words = []
counts = []
for i in range(40):
words.append(top[i][0])
counts.append(top[i][1])
words.reverse()
counts.reverse()
plt.barh(range(40), counts, align='center', color='b', alpha=0.75)
plt.yticks(range(40), words, fontsize=16)
plt.gcf().set_size_inches(18.5, 10.5, forward=True)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment