NumPy Matplotlib DataFrame Data Visualization
Statistics with Python
[matplotlib]
Outlines
What is Matplotlib in Python?
Matplotlib and NumPy
Matplotlib and Pandas
Keywords
Matplotlib Plotting
Matplotlib Marker
Matplotlib Line Style, Color, Width, etc.
Plotting Multiple lines
Adding Titles, Labels and Legend
Standards Subplot in Matplotlib
Scatter Plot
Bar Graphs
Pie Graphs
Histogram plot
Box Plot
Importing Dataset and analyzing in Python
What is Matplotlib in Python?
Matplotlib is a low level graph plotting library in python that serves as a visualization utility.
Matplotlib was created by John D. Hunter.
Matplotlib
Learning is open source and we can use it freely.
objectives Keywords
Alternative to MATLAB.
Matplotlib and Pyplot in Python? How to import Matplotlib library
Standards
Pyplot is a collection of functions that make Matplotlib work like
MATLAB.
Most of the Matplotlib utilities lies under the pyplot submodule.
Each pyplot function makes some change to figure. Examples:
creates a figure, creates a plotting area in the figure, plots some lines
in a plotting area, etc.
Matplotlib and NumPy
NumPy is a package for scientific computing.
Matplotlib uses numpy functions for numerical data and
multi-dimensional
Learning objectives arrays. Keywords
How to import NumPy library
Matplotlib and Pyplot in Python?
Standards
Matplotlib and Pandas
Pandas is an open source Python package that is most How to use Pandas in Python?
widely used for data science/data analysis and machine
learning
Learning tasks.
objectives Keywords
Pandas provides an in-memory 2-D Dataframe.
Dataframe is a 2-D data structure, like a 2-D array, or a table
with rows and columns.
Data fill
Standards
Data normalization
Merges and joins
Data visualization
Statistical analysis
Data inspection
Loading and saving data
Matplotlib Plotting
Learning objectives Keywords
Standards
Matplotlib Marker
We can use keyword “marker” to emphasize each point
with special marker
Learning objectives
Standards
Line Style
We can use keyword “linestyle” or shorter “ls” to
change the style of the plotted line.
Different type of Line Style
Learning objectives
Standards
Line Color Line Width
We can use keyword “color” or shorter “c” to set We can use keyword “linewidth” or shorter “lw”
the color of the line. to change the color of the line.
Learning objectives
Standards
Multiple Lines Line Width
Learning objectives
Standards
Graph Title, Labels, Grid and Legend Line Width
Learning objectives
Standards
Subplot Line Width
Learning objectives
Standards
Scatter Plot
We can use the scatter() function to draw scatter plot.
Scatter() function plots dot for each observation.
It needs
Learning two arrays of same length, one for the values
objectives
of the x-axis, and another for values on the y-axis.
Standards
Multiple variable Scatter Plot
Learning objectives
Standards
Bar Chart
We can use the bar() function to draw Bar Graphs.
The bar() function takes arguments that describes the
layoutobjectives
Learning of the bars.
The categories and their values represented by the
first and second arguments as arrays.
Standards
Multiple Bar Chart
Learning objectives
Standards
Pie Chart
We can use the pie() function to draw Pie Charts.
Learning objectives
Standards
Histogram Plot
We use hist() function create a histogram.
Learning objectives
Standards
Multiple Histogram Plot
Learning objectives
Standards
Box Plot
Learning objectives
Standards
How to Import Excel Data in Python
Learning objectives
Standards
Learning objectives
Thank You