Skip to content

Instantly share code, notes, and snippets.

@Padhma
Created July 9, 2021 19:50
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/5714a8e9b89cc0adf612c2c4040e53b9 to your computer and use it in GitHub Desktop.
Save Padhma/5714a8e9b89cc0adf612c2c4040e53b9 to your computer and use it in GitHub Desktop.
# set figure size and dpi
fig, ax = plt.subplots(figsize=(6,4), dpi=100)
# add colors 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,8000)
# remove grid and set background color
ax.grid(False)
ax.set_facecolor('white')
# plot the data
sns.barplot(data=pop_mean_df, x='Fork', y='Topic');
# set x and y-axis labels and title
ax.set_xlabel('Forks', fontsize=13, color = '#333F4B')
ax.set_ylabel('Topic', fontsize=13, color = '#333F4B')
fig.suptitle('Average forks 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