Tamilnadu Samacheer Kalvi 12th Computer Science Notes Chapter 16 Data Visualization Using Pyplot: Line Chart, Pie Chart and Bar Chart Notes

Data Visualization:

  •  Data Visualization is the graphical representation of information and data.
  • The objective of Data Visualization is to communicate information visually to users.
  • Data visualization uses statistical graphics.
  • Numerical data may be encoded using dots, lines, or bars, to visually communicate a quantitative message.

General types of Data Visualization:

  • Charts
  • Tables
  • Graphs
  • Maps
  • Infographics
  • Dashboards

Uses of Data Visualization:

  • Data Visualization help users to analyze and interpret the data easily.
  • Data Visualization makes complex data understandable and usable.
  • Various Charts in Data Visualization helps to show relationship in the data for one or more variables.

Types of Visualizations in Matplotlib:
There are many types of Visualizations under Matplotlib.

Some of them are:

  • Line plot
  • Scatter plot
  • Histogram
  • Box plot
  • Bar chart and
  • Pie chart

An infographic (information graphic) is the representation of information in a graphic format.


  • A dashboard is a collection of resources assembled to create a single unified visual display.
  • Data visualizations and dashboards translate complex ideas and concepts into a simple visual format.
  • Patterns and relationships that are undetectable in text are detectable at a glance using dashboard.

Matplotlib is the most popular data visualization library in Python. It allows to create charts in few lines of code.

Box plot:
The box plot is a standardized way of displaying the distribution of data based on the five number summary: minimum, first quartile, median, third quartile, and maximum.

Types of pyplots using Matplotlib.
Matplotlib allows us to create different kinds of plots ranging from histograms and scatter plots to bar graphs and bar charts.

Line Chart:

  • A Line Chart or Line Graph is a type of chart which displays information as a series of , data points called ‘markers’ connected by straight line segments.
  • A Line Chart is often used to visualize a trend in data over intervals of time – a time series – thus the line is often drawn chronologically.

Bar Chart:

  • A BarPlot (or Bar Chart) is one of. the most common type of plot.
  • It shows the relationship between a numerical variable and a categorical variable.
  • Bar chart represents categorical data with rectangular bars.
  • Each bar has a height corresponds to the value it represents.
  • The bars can be plotted vertically or horizontally.
  • It’s useful when we want to compare a given numeric value on different categories.
  • To make a bar chart with Matplotlib, we can use the plt.bar() function.

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 pit.pie () function.
  • The autopct parameter allows us to display the percentage value using the Python string formatting.

Various buttons in a matplotlib window:
Home Button:
The Home Button will help one to begun navigating the chart. If we ever want to return back to the original view, we can click on this.

Forward/Back buttons :
Forward/Back buttons can be used like the Forward and Back buttons in browser. Click these to move back to the previous point vou were at, or forward again.

Pan Axis:
This cross-looking button allows us to click it, and then click and drag graph around


  • The Zoom button lets you click on it, then click and drag a square would like to zoom into specifically.
  • Zooming in will require a left click and drag. Zoom out with a right click and drag.

Configure Subplots:
Configure Subplots button allows us to configure various spacing options with figure and plot.

Save Figure :
Save Figure button will allow you to save figure in various forms.

Samacheer Kalvi 12th Computer Science Notes

Leave a Reply

Your email address will not be published. Required fields are marked *