Created
December 2, 2020 16:01
-
-
Save manmohan24nov/57178d412d29a46970e3e524c77cdc00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| states = list(reddit_subgroup_df['subgroup']) | |
| staff = list(reddit_subgroup_df['count']) | |
| fig, ax = plt.subplots(figsize=(15, 8), dpi=800) | |
| ax.bar(states, staff,align='center', | |
| width = 0.5, | |
| color=cm.Blues([i / 1000 for i in staff]) | |
| ) | |
| ax.text(0, 1.08, 'Sentiment Analysis of Reddit Subgroup', | |
| transform=ax.transAxes, size=22, weight=600, ha='left') | |
| ax.text(0, -0.1, 'Source: Reddit subgroup Comments (https://www.reddit.com/)', | |
| transform=ax.transAxes, size=12, weight=200, color='#777777') | |
| ax.text(0, 1.02, 'Count of Positive comments', | |
| transform=ax.transAxes, size=12, weight=600, color='#777777') | |
| ax.xaxis.set_ticks_position('bottom') | |
| ax.tick_params(axis='x', colors='black', labelsize=12) | |
| ax.spines['right'].set_visible(False) | |
| ax.spines['top'].set_visible(False) | |
| ax.xaxis.set_label_coords(.9, -0.05) | |
| plt.tick_params(axis='y',which='both', left=False, top=False, labelbottom=False) | |
| ax.grid(color='black', axis='y', ls = '-', lw = 0.25) | |
| ax.set_axisbelow(True) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment