How to generate Bar Graph using Matplotlib Library

Bar chart is a special type of graph in which numerical values of some data are represented by rectangular bars of equal widths among some discrete set of items to which it varies its length. This type of charts has a discrete range of data which helps in providing visual representation of categorical data. In this tutorial post, we will discuss here about how to generate Bar plots and customize it using Matplotlib python library. And for that purpose, we will demonstrate example of plotting data of visitor’s population entering a museum during different years. For using Matplotlib library for plotting, you must first have to import Matplotlib library and use functions provided by this awesome library. Also, you will use inline magic function %matplotlib inline so that you may display resultant figure after every line of code In[1]: import matplotlib.pyplot as plt %matplotlib inline Now you will define data of populations and years with variable nam...