Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created August 15, 2020 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/60659eb05a9845951bbba4b88c6a6bbc to your computer and use it in GitHub Desktop.
Save aniruddha27/60659eb05a9845951bbba4b88c6a6bbc to your computer and use it in GitHub Desktop.
# Plotting hashtags counts
data = df_pivot.nlargest(columns="Tweet_Id", n = 15)
# Creating bar graph
plt.figure(figsize=(16,5))
ax = sns.barplot(data=data, x= "Hashtags", y = "Tweet_Id", palette=("Reds_d"))
# Altering the visual elements
sns.set_context("poster")
ax.set(ylabel = 'Count')
ax.set_xticklabels(labels=ax.get_xticklabels(),rotation=70)
plt.title('Covid #Hashtags')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_visible(False)
# Output plot
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment