Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 12, 2020 17:28
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 aniruddha27/a9a1f1ba492c9e77ee0f0fb8d646ad08 to your computer and use it in GitHub Desktop.
Save aniruddha27/a9a1f1ba492c9e77ee0f0fb8d646ad08 to your computer and use it in GitHub Desktop.
#bar graph
plt.bar(table.index,table['num_orders'])
#xticks
plt.xticks(rotation=70) 
#x-axis labels
plt.xlabel('Food item') 
#y-axis labels
plt.ylabel('Quantity sold') 
#plot title
plt.title('Most popular food') 
#save plot
plt.savefig('C:\\Users\\Dell\\Desktop\\AV Plotting images\\matplotlib_plotting_6.png',dpi=300,bbox_inches='tight') 
#display
plot plt.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment