Data Vissualization 12
Data Vissualization 12
Introduction
Data visualization refers to the graphical representation of
information and data using visual elements like charts,
graphs and maps etc. It is useful in decision making.
Matplotlib :- It is Python library that provides many
interfaces and functionality for 2 D graphics.
Pyplot :- It is a collection of methods within matplotlib
which allows user to construct 2 D plots.
Importing PyPlot : -
import matplotlib.pyplot
or
import matplotlib.pyplot as pl #pl is alias name
Using NumPy Arrays
• Array :- It is a collection of homogenous elements.
• import numpy as np
Example :
import numpy as np
List = [1,2,3,4]
a1= np.array(List)
print (a1)
Note : Individual elements of array accessed by using
<array-name>[index]
Attribute associate with array
• shape : attributes gives the dimensions of a NumPy
array.