WEBVTT

00:00.120 --> 00:00.920
Welcome back.

00:01.040 --> 00:03.800
Now let's visualize our data.

00:03.840 --> 00:10.600
Matplotlib is Python's most popular library for creating charts.

00:10.600 --> 00:21.120
In order to import and add Matplot library, we're going to use import matplotlib dot pi plot as plt.

00:21.160 --> 00:29.760
Matplotlib is a comprehensive 2D plotting library for Python that produces publication quality figures

00:29.760 --> 00:33.200
in various formats and interactive environments.

00:33.520 --> 00:39.520
So here we need to use the student grades and display them into bar chart.

00:39.720 --> 00:47.040
So plt the Matplot library dot figure figure size eight by five bar.

00:47.320 --> 00:54.440
We need to use the name grade and use the color sky blue and edge color as black.

00:54.440 --> 01:02.720
We need to display the name and the grade title student grades X label would be the students on x axis.

01:02.960 --> 01:08.300
The y axis would be grade and y limit from 0 to 100.

01:08.340 --> 01:18.380
Because the grades are over 100 and plot grid access Y Linestyle dash and dashed and Alpha 0.7, which

01:18.380 --> 01:21.420
is transparency, then we're going to show it.

01:21.460 --> 01:24.020
Let's run this cell and here we go.

01:24.220 --> 01:27.860
We have the student grades like this.

01:27.900 --> 01:31.260
It's very important library to visualize data.

01:31.540 --> 01:40.820
Alice 85 Bob 90 Charlie below 80 and Diana 95.

01:40.860 --> 01:41.340
Okay.

01:41.460 --> 01:50.900
So this is a very important library called matplotlib in order to display and visualize charts in Python.

01:50.900 --> 01:58.740
So I love to use those libraries because they are very interactive and very, very, very useful in

01:58.740 --> 02:01.460
order to display data and visualize statistics.

02:01.500 --> 02:10.700
Also, it contains basic 3D plotting, multiple plot type like line bar, scatter, histogram and etc.

02:10.860 --> 02:13.300
we use the bar graph in this example.

02:13.340 --> 02:14.700
Highly customizable.

02:14.700 --> 02:18.590
We can customize colors, styles, labels, etc..

02:18.710 --> 02:19.670
Interactive plots.

02:19.710 --> 02:20.870
Zoom pans.

02:21.870 --> 02:23.630
Export to multiple formats.

02:23.630 --> 02:27.350
We can export it to PNG, PDF, SVG and others.

02:27.550 --> 02:32.950
And by the way, I used in my, uh, my master's degree, uh, visualization.

02:32.990 --> 02:40.950
Visualization and and the inside the report when making studies and making, uh, like examples and

02:40.950 --> 02:43.870
reports for testing algorithms.

02:43.910 --> 02:44.350
Okay.

02:44.670 --> 02:56.350
So this is a very important library if you have any error uh, in Matlab, in Colab here, we can use

02:56.470 --> 02:59.750
the pip install again in order to install it.

02:59.750 --> 03:11.070
So pip install Matplot and run it and, but uh, since Colab so like this library is already installed

03:11.070 --> 03:12.430
in Colab.

03:12.430 --> 03:22.270
But if you are running the codes on your IDE, you should install the matplotlib before using pip install

03:22.310 --> 03:23.310
matplotlib.
