Skip to content

Instantly share code, notes, and snippets.

@Padhma
Created July 9, 2021 19:17
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 Padhma/6414f31dc36812a93af368a5fdcf58e8 to your computer and use it in GitHub Desktop.
Save Padhma/6414f31dc36812a93af368a5fdcf58e8 to your computer and use it in GitHub Desktop.
# 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