Home » Python8 February 2016

Python: Graph plotting with Matplotlib (Bar Chart)

This article deals with plotting line graphs with Matplotlib (a Python’s library).

Below is the data which we will use to plot the bar chart. The data is saved in a CSV file named result3-blog.csv.


As seen above, the CSV file contains result in terms of F1 measure which is an accuracy measure generally used to evaluate Machine Learning experiments. We have F1 score from three different sets of experiments,

a) while using user rating
b) while using review rating
c) while using combined rating

We have evaluated each experiment 3 times. Hence, there are three rows of value data.

The details about these three experiments is not much of value over here. We can directly concentrate on the data shown above.

Here is the full Python & Matplotlib code to plot the bar chart:

Here is the image of graph/chart drawn:

bar chart matplotlib

Hope this helps.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed

Comments are closed.