Basic matplotlib lesson 1
What is matplotlib?
Matplotlib is a multi-platform data visualization library built on
NumPy arrays, and designed to work with the broader SciPy stack.
why data visualization ?
➔ Human brain can process information easily when it is in
pictorial or graphical form.
➔ Data visualizations allows as to quickly interpret the data and
adjust different variables to see their effect
➔ As data volumes grow, visualization becomes a necessity rather
than a luxury. “A picture is worth a thousand words”
What is the data visualization?
Data visualization is the presentation of data in a pictorial or
graphical format.
Types of plots:
How to use matplotlib?
There are three ways to use Matplotlib:
pyplot: provides an interface to the underlying plotting library
in matplotlib. This means that figures and axes are implicitly and
automatically created to achieve the desired plot.
pyplot mode: is generally preferred for non-interactive
plotting,provides a MATLAB – style state machine interface to the
underlying OO interface in matplotlib
pylab: A module to merge Matplotlib and NumPy together in an
environment closer to MATLAB = pyplot+numpy
pylab mode: merge together pyplot and numpy in a common
namespace. It is convenient for interactive calculations and
plotting. It makes the environment more MATLAB-like.
Object-oriented way: The Pythonic way to interface with Matplotlib
NOTE: The object-oriented is generally preferred for non-
interactive plotting (i.e., scripting).
Matplotlib main object
Figures: The plot itself, include dimensions and resolution
Axes: A figure can have multiple axes, from which can be defined
plots and text
2D lines: 2D lines have properties such as color, thickness, etc
Texts: Objects which can be used from figures or axes. Properties
include font, colour, etc
Getting started
How to install matplotlib ?
pip install matplotlib
Matplotlib Tutorial 1 | Installing matplotlib library
https://www.youtube.com/watch?
v=Hax7vACiEfM&index=1&list=PLqEbL1vopgvs1p90E3Ig_OTY08wBTCj9B