0% found this document useful (0 votes)
9 views

METPLOT-LIBRARY(matplotlib)

The document provides an overview of data visualization using the Matplotlib library in Python, highlighting its importance in representing large or mathematical data through various types of plots. It details the installation process and basic usage of Matplotlib, including examples of different plot types such as line, scatter, bar, and pie plots. Additionally, it explains how to import and utilize the pyplot submodule for creating visualizations effectively.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

METPLOT-LIBRARY(matplotlib)

The document provides an overview of data visualization using the Matplotlib library in Python, highlighting its importance in representing large or mathematical data through various types of plots. It details the installation process and basic usage of Matplotlib, including examples of different plot types such as line, scatter, bar, and pie plots. Additionally, it explains how to import and utilize the pyplot submodule for creating visualizations effectively.
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

METPLOT-LIBRARY(matplotlib)

Data visualization - It is a quick , essay way to convey concepts in universal


manner .Large data or mathematical data can be represented using graph or any other
means so that it can be analyze essay
data visualization is the graphical representation of information and data.
This visual element can be represent using graph or map or box plot
Data visualization tool provide an excusable way to see and understand the trends ,
outlawyer , and pattern in the data .

Types of Data visualization


Since python is very rich programming language that provide large numbers of the
library that help in data visualization
e.g.- (1)matplotlib
(2)Panda Visualization
(3)Seaborn
(4)gg plot

Matplotlib
it is a plotting library for the python programming language and its numerical
mathematics
extension
numpy

Matplotlib is a python library used for data visualization matplotlib is two


dimensional an three dimensional plotting library it was introduced by Jon hunter
in 2002
Matplotlib Graph
following graph can plotted
1 liner plot
2 scattered plot
3 bar plot
4 step plot
5 box plot
6 pie plot
7 fill between plot

Installation of Matplotlib
If python is already installed on you system then installing matplotlib is equity
easy . matelot library is installed import it in your application by adding the
import module statement that this import matplotlib

pyplot
Most pof the marplot library unicity is lies under the pie plot submodule , and
usually imported under the plt alias
(import matplotlib.pyplot) as plt
Now the pie pleat package can be refired to as plt for
example drow a line in a diagram for

import matplotlib.pyplot as plt


import numpy as np

xcoordinate =np.array([0,10])
ycoordinate =np.array([0,100)]

plt.plot(xcordinate, ycordinate)
plt.show()

the plot function is used to drow the points in a digram .


by defalt the plot function frow a line from point to point . the function take
parameter for specifing points in the digram .
e.g Drow a line in a digram from postion (1,3) and to postion (8,25)
import matplotlib.pyplot as plt
import numpy as np

xcoordinate = np.array([1,8])
ycoordinate = np.array([3,25])

plt.plot(xcoordinate , ycoordinate)
plt.show()

Ploting Without line


plt.plot(xcoordinate , ycoordinate,O)

Drowing multiple pointas


user can plot as many as poin but makr sure the same number of values must be
given for both axis

xpoint=np.array([0,1,2,3,4])
ypoint=np.array([4,6,8,7,11])
plt.plot(xpoint,ypoint)
plt.show()

You might also like