Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created January 10, 2018 17:16
Show Gist options
  • Save dipanjanS/52f6176f5f6fab03fed4e1d3f688a2d7 to your computer and use it in GitHub Desktop.
Save dipanjanS/52f6176f5f6fab03fed4e1d3f688a2d7 to your computer and use it in GitHub Desktop.
# Bar Plot
fig = plt.figure(figsize = (6, 4))
title = fig.suptitle("Wine Quality Frequency", fontsize=14)
fig.subplots_adjust(top=0.85, wspace=0.3)
ax = fig.add_subplot(1,1, 1)
ax.set_xlabel("Quality")
ax.set_ylabel("Frequency")
w_q = wines['quality'].value_counts()
w_q = (list(w_q.index), list(w_q.values))
ax.tick_params(axis='both', which='major', labelsize=8.5)
bar = ax.bar(w_q[0], w_q[1], color='steelblue',
edgecolor='black', linewidth=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment