Page 294 - AI_Ver_3.0_class_11
P. 294
• Graphical Technique: Graphs are commonly used to visualise statistical data using points, lines, dots, and other
geometrical shapes. The human brain is more comfortable coping with complex and massive amounts of material
when it is represented visually. Data visualisation refers to the graphical or pictorial depiction of data using
graphs, charts, and other tools.
Task #Creativity and Innovativeness
Visit https://datavizcatalogue.com/ and study the different types of charts available.
The Data Visualisation Catalogue is a project developed by Severino Ribecca to create a (non-
code-based) library of different information visualisation types. The website serves as a learning
and inspiration resource for those working with data visualisation.
Introduction to Matplotlib
The purpose of data visualisation is to simplify the interpretation of complex data. Visualisation in Python can be
accomplished using the Matplotlib library. This extensive library enables the creation of various plots, such as line
plots, bar charts, histograms, scatter plots, and more. Matplotlib is highly customisable, giving users detailed control
over the appearance of the plots. The ‘pyplot,’ submodule of Matplotlib, offers an interface like MATLAB and includes
numerous convenient functions that simplify the process of creating basic plots.
Install Matplotlib library in Python by giving the following command:
pip install matplotlib
or
python – m pip install – U matplotlib
While writing a Python program, we import the pyplot module of matplotlib library by giving the following command:
import matplotlib.pyplot
Some of the common functions of Matplotlib library with their descriptions is given below:
Function Name Description
title( ) Adds title to the chart/graph
xlabel( ) Gives label for x-axis
ylabel( ) Gives label for y-axis
xlim( ) Gives the value limit for x-axis
ylim( ) Gives the value limit for y-axis
xticks( ) Places the tick marks on the x-axis
yticks( ) Places the tick marks on the y-axis
show( ) Displays the graph on the screen
savefig("address") Saves the graph to the given address
figure(figsize = value in tuple Sets the size of the plot where the graph is drawn. Values should be
format) supplied in tuple format to the figsize attribute, which is passed as an
argument.
292 Touchpad Artificial Intelligence (Ver. 3.0)-XI

