between the bars. On the ot her hand, there is proper spacing between bars in a bar graph that indicates discontinuity. . Items of the histogram are numbers, which are categorised together, to represent ranges of data.
As opposed to the bar graph, items are considered as individual entities. . In the case of a bar graph, it is quite common to rearrange the blocks, from highest to lowest. But with histogram, this cannot be done, as they are shown in the sequence of classes.
. The width of rectangular blocks in a histogram may or may not be same while the width of the bars in a bar graph is always same. Pie Chart Pie Chart is probably one of the most common type of chart. It is a circular graphic which is divided into slices to illustrate numerical proportion.
The point of a pie chart is to show the relationship of parts out of a whole. To make a Pie Chart with Matplotlib, we can use the plt.pie() function. The autopct parameter allows us to display the percentage value using the Python string formatting. Example import matplotlib.pyplot as plt sizes = [ , , , , ] labels = ["Tamil", "English", "Maths", "Science", "Social"] plt.pie (sizes, labels = labels, autopct = "%.2f") plt.show() 12th Computer Chapter - - Output English Tamil Social Science Maths .
Figure . Hands on Practice . Plot a line chart for the given data and set the title for x and y axis. Average Pulse: , , , , Calorie Burnage: , , , , .
Plot a pie chart for your marks in the recent examination. . Plot a line chart on the academic performance of Class students in Computer Science for the past years. .
Plot a bar chart for the number of computer science periods in a week. 12th Computer Chapter - - Data Visualization using Pyplot