Created
July 9, 2021 19:17
-
-
Save Padhma/6414f31dc36812a93af368a5fdcf58e8 to your computer and use it in GitHub Desktop.
This file contains 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
# set figure size and dpi | |
fig, ax = plt.subplots(figsize=(6,4), dpi=100) | |
# add color to edge | |
plt.rcParams['axes.edgecolor']='#333F4B' | |
# customize spines and tick parameters | |
ax.spines['top'].set_visible(False) | |
ax.spines['right'].set_visible(False) | |
ax.spines['left'].set_visible(False) | |
ax.tick_params(axis='both', which='both', labelsize=10, bottom=True, left=False) | |
ax.set_xlim(0,45000) | |
# remove grid and set background color | |
ax.grid(False) | |
ax.set_facecolor('white') | |
# plot the data | |
sns.barplot(data=pop_mean_df, x='Star', y='Topic'); | |
# set x and y-axis labels and title | |
ax.set_xlabel('Stars', fontsize=13, color = '#333F4B') | |
ax.set_ylabel('Topic', fontsize=13, color = '#333F4B') | |
fig.suptitle('Average stars on each topic',fontsize=18, color = '#333F4B'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment