Welcome back.
Now let's visualize our data.
Matplotlib is Python's most popular library for creating charts.
In order to import and add Matplot library, we're going to use import matplotlib dot pi plot as plt.
Matplotlib is a comprehensive 2D plotting library for Python that produces publication quality figures
in various formats and interactive environments.
So here we need to use the student grades and display them into bar chart.
So plt the Matplot library dot figure figure size eight by five bar.
We need to use the name grade and use the color sky blue and edge color as black.
We need to display the name and the grade title student grades X label would be the students on x axis.
The y axis would be grade and y limit from 0 to 100.
Because the grades are over 100 and plot grid access Y Linestyle dash and dashed and Alpha 0.7, which
is transparency, then we're going to show it.
Let's run this cell and here we go.
We have the student grades like this.
It's very important library to visualize data.
Alice 85 Bob 90 Charlie below 80 and Diana 95.
Okay.
So this is a very important library called matplotlib in order to display and visualize charts in Python.
So I love to use those libraries because they are very interactive and very, very, very useful in
order to display data and visualize statistics.
Also, it contains basic 3D plotting, multiple plot type like line bar, scatter, histogram and etc.
we use the bar graph in this example.
Highly customizable.
We can customize colors, styles, labels, etc..
Interactive plots.
Zoom pans.
Export to multiple formats.
We can export it to PNG, PDF, SVG and others.
And by the way, I used in my, uh, my master's degree, uh, visualization.
Visualization and and the inside the report when making studies and making, uh, like examples and
reports for testing algorithms.
Okay.
So this is a very important library if you have any error uh, in Matlab, in Colab here, we can use
the pip install again in order to install it.
So pip install Matplot and run it and, but uh, since Colab so like this library is already installed
in Colab.
But if you are running the codes on your IDE, you should install the matplotlib before using pip install
matplotlib.