Skip to content

Instantly share code, notes, and snippets.

@dennisdv1
Created December 2, 2020 09:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dennisdv1/68d884564795dc7ac53d23e062afb525 to your computer and use it in GitHub Desktop.
Save dennisdv1/68d884564795dc7ac53d23e062afb525 to your computer and use it in GitHub Desktop.
# Sort tuples from high to low on match percentage
match_pairs.sort(key=lambda tup: tup[1], reverse=True)
# Unpack tuples
names, pct = zip(*match_pairs)
# Plotting
sns.set_theme(style='darkgrid')
fig, ax = plt.subplots(figsize=(12,8))
ax.set_title('Job offer match with candidates', fontsize=20)
ax.set(xlabel='Candidates', ylabel='% Match')
ax.set(ylim=(0, 100))
sns.set(font_scale=1.5)
sns.barplot(x=list(names), y=list(pct), color='b')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment