Hello, everyone, and welcome to this deal from this Teito deal with loan data visualization with matplotlib
liablity.
Let us begin.
The Matplotlib Library is an amazing visualization library for two dimensional plotting.
And it is built on numpty at Ade's for the data, which Chen.
There are two methods in matplotlib library.
First one is the functional method.
And second one is the object oriented method.
Let us understand.
Functional method fast.
First, we have to import the library, read import.
No, B, as.
And B, then import matplotlib
dot by plot as PLDT.
And at the end, Veoh, to import random integer class to do that day from Numpty Dot random.
Import random integer that is around and be great.
No, the cube.
For the data visualization V, how to define X and Y variable, A X is equal to ENPI Dot Lin space.
Here we have to specify three arguments, zero, 10, 20, zero is the lower bound.
Pain is the upper bound and 20 is number of intervals, delay in space returns, evenly spaced numbers
or a specific interval.
And this is the specific interval.
Zero to ten.
Now execute.
Take X.
Great.
So these are the 20 evenly spaced numbers from the interval zero to ten now defined by variable.
VI is equal to.
Random integer zero 50 20 in the cube.
No gick buy variable.
Great here, a little detail is the lower bound.
50 is the upper bound.
And we're selecting 20 random numbers from the interval zero.
250.
No, no, down here in X and Y variable.
These two are the added ENVI variable.
These are the random numbers.
Let us start them define white is equal to ENPI dot method sort.
And in parentheses, again, vi execute.
No, take Devi.
Great.
Now, these are random numbers, add in ascending order the.
Let us visualize the data.
They built the dot plot.
And embattled tiffy's ex Guama Vij.
So this is the output excesses, why axes?
And these are the data points here.
We can add X label, VI label and title.
Let us see how it don't enter a BLT dot x label.
Specify X label as x axes.
You can specify any string.
Then PLDT dot vilely.
But.
Why exs?
Then specify title BLT dot title.
X versus Y Axes argued.
Great.
You can see X-axis VI, XII's X versus Y axes.
This is X level.
This is Viall label.
And this is the title here.
We can hide these details.
To do that, a BLT dart shoe.
It's cute.
Again.
Great.
When we use dot show method, then it shows deep graph like these.
And before that, it is only printing.
In this graph, we can add more details.
Let us see how.
Go to any browser and search matplotlib documentation.
Click on different link.
So this is the matplotlib documentation.
No search blocked.
Scroll down.
Click on these matplotlib dot by plot dot blog.
Great.
Here we are selecting matplotlib, not by plot dot plot, because we're plotting the graph using this
method dot plot.
You can see here this method dot plot.
And that the details about this matter.
Scroll down.
These are the details about barometer's.
We can specify X VI then all other parameters.
And these are the proper deeds.
Property and description, we will see some of these properties.
First one is the color.
No, scrawled on.
These out of the character names for these Gallas.
Specify Galut.
I will specify M.
This one, Magin Top.
In the Gude.
Great.
Now, the data points are in this gala, Magin Dot.
Similarly, we can specify other Golos.
And these are the options.
Now scroll up.
We will specify this property lines.
And these are the options, dash, double dash and all other options.
These are the options.
Lifestyle is equal to double dash executed.
This is the output.
You can try other options.
Also, let us see one more parameter marker.
Scrawled on.
So do that of the characters.
And this is the description, Fotomat, because.
We will specify this marker.
Star.
Monica is equal to Star.
A cute.
So these are the markers we can increase marker sites.
Also.
This one marker, Sayed's.
Market decides is equal to.
We have to specify a number.
Increase the number 10.
Marker size is increased.
Similarly, we can increase line weight.
This one line vid.
I will specify one point for you.
Landward is increased.
So there are all other properties you can take all of these for the property line.
We can specify land with our LW.
Like this, instead of line vid, we can type LW.
Same result.
So these are the basics about depleting.
Let doesn't understand multiple plots on same canvas.
For the multiple plotting B, how to use a metal pipe PLDT dart subplot here, we will specify three
arguments, one to one number of rows.
Number of columns.
And the plot that we add offering plot something here.
BLT Dot Plot X and VI specify color
read execute.
This is the output.
I know it is a little bit confusing if you haven't understood anything.
Then don't worry.
Add one more subplot, BLT Dodd subplot.
Number of photos is equal to one number of columns is equal to two.
And the canvas that we are lifting is to previously be where they are fitting first canvas.
Now, plourde BLT dot plot.
X vye.
And.
And that is Magin Dopp.
Great.
Now, you can understand clearly one drew here, also one drew and two columns.
These are the two columns.
He had a very offering canvas one then Vieri offering canvas to similarly, you can specify a different
number of rules, different number of columns, and you can offer canvas accordingly.
So this is all about deep plotting, multiple plots on same canvas.
To do that, we have to use this method subplot method.
For more details, you can type here in matplotlib documentation.
Subplot.
Matplotlib don't buy plot, dots upload.
Here to will get all the details.
These are the parameters.
Then property and description.
And all other details.
So this data visualization tutorial here in this tutorial VLT understood how to plot digraphs.
To do that, we have to use this matter dot plot method.
And after that, we help unless to multiple plotting on same canvas.
And to do that, we have to use this method dots, a blood method.
I will see you in the next data visualization ordeal.
Then, happy learning.