In Matplotlib visualization, the figure represents the entire canvas or drawing board, while the axis is the specific plotting area within that canvas. The figure houses all elements and is what gets exported when saving a visualization, while the axis controls the actual data plotting and customization. Understanding this distinction is crucial because you can have multiple axes within a single figure, allowing you to plot multiple graphs on the same canvas. The figure size (e.g., 10x6 inches) determines the overall canvas dimensions, which affects how the visualization appears when exported. This architectural separation enables granular control over each aspect of your visualization, from the overall layout to individual plot elements.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Learning how to Visualise Using PYTHONAdded:
four prices over time.
Um, so the the just to give you an overview of this data set, it starts from 2023 up until end of 2025.
So we want to monitor the trend particularly up to the point where subsidy was removed and see how that looks like um how the C went before subsidy and after subsidy. This is a very relevant um practical classroom because it's something that a lot of us can relate to even down to our individual lives.
So that particular data set is PMS prices. You download it um just like I've been doing. You create a new workbook.
>> No.
Okay. Um for now the one that we need is the DNS prices.
Bone is for a different is for a different graph that we might plot data.
But this first graph is PMS prices.
You create a new sorry name visualization.
Yeah, >> at this point. also know how to import your data or upload your data and also import some of the So remember this one we're plotting the graph primarily with math plot. So we don't need to import Thank you.
Okay.
Hallelujah.
I didn't Okay. So before I go further just a warning today some of us might get confused but before further I want to explain two fundamental concepts that occur with man's blood leave and his own visualization.
So there are two concepts here. There's the fig which represents the figure and the axis. Those are two separate entities. The figure is the entire canvas.
So when we say fix size 10 and six, what we're indirectly saying is the size of the canvas want to use wants the width to be 10 in and the length to be 6 in.
So for instance, if I change that six to 10, you see now it looks more like a square 10 by 10.
So the figure is what you use for everything is housed under the feet. If you want to export it for instance as a picture, what you're exporting is the feed, not the axis. Now the axis is contained inside this canvas. And why I'm explaining this is because you can also have instances where you have two axis which means you're plotting two tables inside this one figure. Do you understand? So that's why the two are separated. Remember I said with ML you can control practically all the granular aspect. So that's why this is just like your drawing board and you say okay I want to draw one graph here and one graph here in that case will have two axis. Uhhuh. So I just needed you to understand that this comma you know that we're talking about two separate things.
One is the overall template or let's say drawing paper.
Then the other one is the axis. So from here to here now speaks to So anything within here to here into it asks anything outside this area we're using fig do you understand >> anything you see this box that's that's why I didn't even draw any graph yet you see this box 1.0 Z to Z to here where you have this whole line I think is still >> yes it still proceeds to here so anything within this black line here we're using the hs to control it anything that goes beyond the black line let's say for instance let me give you a typical example I can choose to name the title of my graph both in the axe and in the fig. If I use the axe command to name the title, it means it's going to be within this area.
If I use the fig, it means it's going to be above way above this area because now I'm referring to the entire figure.
Does that make sense? Yes. Please before you go further, you mentioned that there are two concepts that comes with the math plot library. So I just want to just spell out the two concepts so that we know that this is what they are talking about.
>> So that's what I'm explaining.
>> Okay?
>> Because that's what I have written here.
Maybe let me just zoom this so that >> okay thems but everything above here you're already familiar with it and what it speaks to.
So this the first line I've introduced that is different from what you're familiar with and that's why I'm explaining >> and that's why for instance here what we are saying is plot give me a space to plot graphs and let the size be 10 in by 6 in. The reason why we can do that is sometimes you might be plotting a graph that you want it's not meant for let's say paper report it's meant for a poster. You understand? So if you use a small size it means when they export it and they now want to carry it for print by the time they stretch it the resolution would also reduce. So once you have already defined here that let's say that poster now is 50 in you define here from your figure size let the figure size be 50 in by 30 in already the paper it will create for you would match that 50 in by 30 in when you're now exporting and you export based on that size and you can even specify the resolution that you want to export at it export it with that quality so that by the time they're going to print it out.
It doesn't lose quality. If it's for let's say a normal report on PDF and all that, you don't need something so big.
You can use something smaller. It will also match the resolution and everything. Yes, please.
>> Okay. So for clarity purpose what you're saying is that you know um yesterday we've been saying import pandas n then mark le and then seab bond now we not we have to kind of remove the seaborn from today's zone or still include seab bond >> so understand what today speaks to >> yesterday I was showing you how to use seaborn to do visualizations which is like me teaching you how to drive automatic car.
>> Today I'm teaching you how to use smart plot to do your visualization which is like me saying okay you have learned automatic come and learn.
Now the idea is by the time we are done you now know how to drive both automatic and manual. If you now choose that is automatic you want to be driving that's fine. If you choose to be fine >> we didn't alter anything here this place it will come automatically but now that he started showing us you can increase the outside of the of the inside of the so everything yesterday we But under symbol, can you also customize it? Like can you customize and >> so if you're customizing it, you're using a m library to customize it, >> not you understand?
So what we're doing here is just you know how painters want to paint.
Sometimes they might be painting on a small drawing board. Sometimes they might be painting on a wide drawing board.
This particular command is just explaining what is the size of my drawing board. I want to paint before I like this.
>> So you know what axis means.
>> You know what axis means when they say y axis x ais.
>> So just imagine anytime you see this axis this already would tell you that this an axis. So what I'm saying is anytime I want to do any manipulation that involves an axis >> you understand I will be making reference to this ax. So you might see certain codes that have ax dot that's why I'm explaining this so that by now I start typing I see ax dot blah blah blah blah blah you understand first of all that it is acting on the axis if for whatever reason you see f dot you understand that that cone is referring to the entire figure and the reason I said this is that in my own drawing board I can decide I want to break the drawing board into two and on one half I'm painting one thing on another half I'm painting something totally different but it's the same drawing board you understand so that's the idea between fig and axis now I'm just choosing to paint one picture in one drawing board but it's still possible that I paint multiple pictures within one record you I have.
>> So, have we copied the code up to this point?
>> Is there anyone has a copy?
>> Comments.
If you want to go into that, it's fine.
Good.
Before I proceed, I just want again once to give us a little detailed about our table. All I just did was already familiar with to review the table so that when I'm making reference to certain columns originally at least you have an idea of what the table speaks to. So the table essentially has only two columns as you can see here. There's the month column which essentially is the year and on and there's the average home price naira column which is essentially how much was on average during those months. So from here you can see for 2023 in January the average price of oil was 195 NRA by February increased to 196 um by March 29 by April 227 by May 213.
So if you see me calling the column average bond price in Naira at least with this picture of this table you know what it's seeking to achieve. If you see me calling the column month you know what is seeking to achieve. So these are essentially the two columns. Now if I'm to try to answer the question of what was the change over time who can tell me the graph that we will be using to try to demonstrate this >> change.
Yes.
So because we have time here and we have the amount. So now that at least we understand this conceptually we can now go into calling this graph. So remember let me run this again so that for remember this is our axis.
>> So now I want to populate that on this axis. Um so the next code you see is uh me trying to populate the table on the axis. So just for the purpose of so that I can always come back to this illustration. Let me use a new code block. But if you want to continue having it on the same code block that's also fine.
Good.
Okay.
So now you're starting to understand the reason why I have to differentiate the fig for you because now I want to plot on the axis.
I'm applying the plot function on axis and I'm telling it take the PMS the column month remember square brackets is how we indicate column take the month and take the other column um average from price and plot it on the axis then show me the plots So, whoever has run it should tell me what's their results.
specify your feet.
This is some customization that we do.
So, let's add let's add a color to our graph.
Screw the person.
Following Sh. Sh.
Wow. Beautiful.
>> Let me explain the error that happened.
>> Yeah.
um you know here I had created a figure which is like a drawing board and an axis. So it's like you know how you have drawing paper you open one page then by going to a new blog it's like I'm now saying I don't want to draw on that paper again I want to draw on a different paper but now I didn't specify that I want to create this thing on a paper so you run this thing but there was no paper for it to draw >> does that make sense So what that means is for every graph we want to plot this has to be the first line essentially we bring in the paper that we want to plot the graph on before we start typing.
>> Let me first of all remove it so that we appreciate what he's doing.
Now remember um it has some default colors and blue happens to be one of those default colors by topics for practically any visualization.
So what I had done was if I had run it at first without separating that figure, this is how you would have seen our graph which I mean it's not the best but uh you can see the line for starters so you can read the trend.
So before we go into tampering with the asses, I just wanted to work on the line itself.
>> No, I wanted you to see the before.
>> You know, it's before and after. So it will make sense that you don't see it from that point where So now this is me putting back uh putting the color that I like to use most times which is steel until it's closer to green. So you see the difference now. Now the next thing I did which is still on this plotted graph is to increase the line width. So this one now is subjective. If you feel uh this like how I don't know whether MS does this >> like adding border to to the shape.
>> Yes.
>> You know MS does it right? Uhhuh.
>> So like making it thicker. So the number you specify here is now how thick it would be. So let's say for instance if I went as far as seven you see what comes out.
>> Uhhuh. So if maybe your director is complaining that the line is not showing well you know where to order that is the line width you're working with for that.
So but for me I just want to use something a bit subtle.
You don't need to follow me. You can use whichever one you feel you would like to see on your own graph. Everything that you're doing system is for you.
>> So do we understand the customization up to this point?
>> Okay. Are we able to see the text and it So if there was a particular shape of T that I wanted, what would I do?
You good?
>> Okay.
>> I just wanted to see whether we remember what we did yesterday.
>> So, do I proceed?
>> Yes.
>> Okay. So, like we rightly said, as much as we have a plot, this plot is not presentable yet. You can't send this to anyone. N12 just bounce a report back.
Yes.
So you know it just took exactly what we asked it to do. We told it plot months by amount.
So if there were 1 million months it try to fit in all the 1 million months into the axis.
Aha. for it is garbage in garbage out.
So this is why I said we're driving a manual car. You're now going to be manually specifying what you want. If not, it will do exactly as you see by default. So now what are all the things we can spot in this graph that we would like to work on?
>> The x-axis.
>> The x-axis which is very obvious.
Well, it starts from zero technically.
>> Yes. Uh it's just based on um it's incremental in hundreds and it was trying to but it does start from zero and it's what it assumes to be zero.
And that rule applies more to a bar chart. Just to make it more specific, it applies more to a bar chart. So for starters, if I didn't tell you that this um graph is speaking to petroleum prices, would you know anything about what these numbers are speaking to?
>> Okay, you didn't.
>> So you look at yaxis. What is yaxis? You don't know. Is it count is it currency? You don't know is it? So now we need to customize the information around the plot. Okay. So the next set of codes that I will be putting are geared towards that first customization of okay let the code let the plot have a title and let the axis to have some form of title so that someone can make sense out of that.
So remember, we're still working on the axis.
Hallelujah.
Okay. So, um like I had expressed earlier, this information we want to put now, are we putting it on the figure or the axis?
>> Yes. This information we're discussing about, does it relate to the figure or the axis?
>> Show me.
>> So I have a question.
If I had two axes here like two graphs inside this figure and I use figure to name it where we figure now place it too. Let's say the two graphs are two separate types of graphs that speak to two separate things. So one is for petroleum price the second one is for price and then I'm using the this is a graph for petroleum prices on figure >> okay so even because it's what is plotted within this axis that we're trying to also describe.
>> That's also why we're going to use the axis. So that if for whatever reason we want to add a new thing to this figure, the axis information will move with wherever the axis moves and that new axis information would also be wherever that axis is. So it's not like we can't put the title on the figure. But I'm just trying to help you understand why I want to now put it on the axis instead.
You understand? Everything here is nittygritty customization, but you can do the two.
>> So eventually I'll also show you how to put it on the figure if that's the only um if that's the only thing that you want to put inside that image.
>> Yes.
You have to use So we would use for So it's months. We say because I only show you that So just like what I did, I can also add some customization size.
That's what Which location?
Is it the left center? So we can play around to see the different this text. So I can go and search for Yo, this is indicates measurements.
Thank you.
All right.
Sorry.
Okay, lost.
I Sir, it's too tiny.
>> What is the road? You can't see it from here.
So that was something.
>> So at this stage, who wants to explain the school?
So based on my understanding I think uh you use the code except title. So we want to search the the title on the for the petrol for the horizontal and vertical.
uh you use patrol press over the last two years, then you want the size font size of that one to be 16 and you want darkness to be the the font to be bold and you want it on the center.
Okay. So now you change the italics Okay.
>> All right. So to b it and to be h on the center. Okay. Then the next command was for the x level months. The font size should be 14 months. And then the font size is 14.
And um the other fund size is 16. You can see the difference on the for price over the last two years. Then um for Y level for Y okay.
So all of them are 14. Then you ask the Python to plot it so that you can see So, so you can see because he added me just appeared on that So if it's dollar you write USD there or you find the dollar symbol there or you still have a lot of customization to >> I I'm sorry for you.
It's not funny.
>> So we cop it up to this point.
Justice.
You know what? American I think it's running next.
You can't make sense out of any of this part of the exact way to So if you want to use different because when I was doing my practice I was using different.
So what I would do is If you want to use it means you copy everything here for instance it so that each code you can be since you're learning I recommend that for you so that >> so that you know what Yes. But the important part is this nothing will run if this is not here.
So now okay because we can see how the whole month is.
So that was something we used yesterday when we're trying to work on the What was that thing?
>> I remember saying the rotation was in a particular library.
Exactly.
>> All those rotations they were under X.
I told you that X6 is part of just to let you know that that's going to use something similar to this particular area.
So remember this is the sois set X6 Now the only way we can work at this is if we display this in range you understand. So rather than displaying every single month, we can say let's say from month one to month four that's one from month four to month eight that's another which is what we include practically in our own graphs right you don't need to display then you know in between are the individuals >> so we're going to use that so that's almost like display So we're going to call on the range function and we'll say start from zero to now this next thing what it means l means length. So we're saying from zero to the length of the data frame. So you call the name of your data frame here. Some people said their own as some people followed me but the point is you call the name of whatever.
So you're saying from zero to the length of this data frame I want you to space it in four that's you know for me I'm using four because I feel every four months is more does that make sense That's good.
Let me first it better.
Does this make more sense?
>> So if for instance this particular um we were having the issues we're having yesterday, we could still decide to now utilize the to slant it.
I'm just putting this now for the purpose of knowing even though it seems to call and we're making reference to where our data is something else that reference to the column which is the column That's like our emperor is what you're familiar Let's see.
Remember horizontal alignment.
run straight to extinct.
Hallelujah.
No grandpa.
Don't do something.
Okay.
Ask me why.
That's not good.
Maybe You get one.
Yes.
Next slide.
I need to deliver is under force which was what we did here.
So for instance if we didn't do it what it will be expecting it will be expecting to do this rotation on every every count on which like this is what is expected. So if this was the case would have applied it by default. So it just does it on every count. But now I've changed this default and done it in false. You understand? So it needs to know that the liance that you're working on is in force.
>> So that's what this is trying to indicate for it. So that's why when he now comes here, he knows that after this first one, I'm supposed to count four.
It's just at this point you need to just understand the language.
>> Yes.
It's the last Okay, good.
So for a good number of us a graph like this can even fly for most of what we want to do it's it has at least a lot of the fundamental information but we can still decide to go further in our customization which is what I want us to do. Remember I had made reference on our day one for sorry day six that the idea of your visualization is in as short time as possible you want the person looking at your graph or your visualization to pick all the important messages.
So if you look at this, you'll notice that there is a spike from here. Everything seems to be growing gradually or maybe not gradually but it has a pattern. But from for some reason from here to here there's a sharp spike.
Now the natural question anybody that looks at this thing will ask you is what happened during this time that led to this particular spike. Who can tell me what happened during this time?
Where was >> we seeing this time frame.
>> So what happened?
substitute.
>> So, but someone who sees this graph and is not a Nigerian or maybe was in the diaspora and wasn't following the daily news might not know.
So you now you know and see how long it took you to know even though we are Nigerians it took us close to 7 seconds to figure out it was subsidy.
>> So we want a situation where even within this graph when we're showing someone at first glance every normal person will want to know what happened here that's the first thing that will come to their head. So why the sharp increase?
Something is not normal around here. So because this is meant to tell a story, we also want to guide whoever is the person because like you said, this is the first question that will be asked.
And for our insights to make sense, it has to be able to answer most of those important questions. So we want to be able to do a pointer around here expressing what happened here. So that if like I said for some reports this is good enough. You understand? But if you want to fulfill most of those rules I put out there where under 3 seconds someone is able to understand your it makes more sense that you highlight those important aspects. So the next part of what we're going to do is tailor to achieve that particular objective. So I will advise you like before to just copy this code because we're going to be updating it and uh create a new block except you're comfortable using the existing one. If you feel it won't confuse you when you want to go back. No problem.
So there's a professional name for this thing that we're about to do. They call it annotation.
Let me show So you see the meaning of the word annotate. Are we following >> to add explanatory notes, comments or critical remarks to a text, image or diagram. It is the act of providing context, insight or clarification to make complex information easier to understand. So in that case like we said we're trying to provide some context as to what happened within that sh so that when you see this comment annotation you understand what I'm referring to by using annotation. If you want to go into more, feel free.
>> So I mean we might not be able to tell that here because uh we have collapsed a lot of the colle.
This is May and this particular spike took place sometime between May and June. That was when if you look at the raw data you will notice that that was when it happened. So we are going to create a pointer that will point at June because it's June that the actual peak of the spike uh was reflected and um on that point I will have an annotated text that just gives a brief expression of what happened there.
So I'm going to first of all create a variable called June.
And remember when we were using tables, we remember we talked about the index, right?
>> Yes.
>> You saw that before every proper table there's an index. Where does an index start from?
>> Zero.
>> Zero. Uhhuh. So for explain where June is, we need what the table understands the most is that index. So we need to guide it to know where to find June on the table.
So that is what we're now going to do with our code.
So I'm going to call the table which we save it as.
So there are two ways to this You see this annotation I'm not you mommy show.
>> So let's wait for him to finish time.
Copy. Copy everything.
That was a good index. So that's why this approach So while we might do it manually and find out that June is index five if for whatever reason the table has so many rows and we don't have the time to actually settle down and count or there might be the possibility of error. What we're saying is utilize the index function.
Go to the column under the data frame month and find what matches two 20 um 2023 June because that was how we did the columns there. Remember there are several Junes. There's June 2024, there's June 2025.
Uh-huh. So remember this sign, the double equals to. It's a boo, which means you're looking for exactly this.
>> So it will scan through all the rows on the table, searching for anything that matches 2023 June. And when it sees it, it's going to return it as true. So when it finds it, it's now going to trace it down to the index column and now pick what the column for that particular one is. And what it is Now after that we are going to create another variable called price.
under.
>> Now remember when I write June, I already created the variable June here. So anything that was the result of this entire code it now applies here. So like we agreed the result of this entire code based on the index number will be five. So now we're saying track the location under this database location five in the index.
I know it's a bit of typing but I just want to explain it before I go further.
>> And the column average home price So the first code was to look for where June is. The second code we want to pick the price. So we're like when we found the index of where June is, collect whatever is under the column average price for that particular Does that make sense?
>> So the number of the row June is and now we're getting the price that is linked to June. So when you reference June, it comes to this June finds the index that speaks to June. Then now comes to the fall price and finds the call price that was attached to that particular index number.
So that's how he knows where to put his pointer on in the actual chart.
Now officially >> since you have been able to guide it where So this where we now add the manual text we want it to display at that point.
So we can say well subsid Now it knows where to point to but we also want to draw we don't want the text to just be at that place it's pointing to you understand so now want the text to be somewhere a ruler pointing to it want to separate the text from that particular point.
>> So now this next part is to handle the position of where text would be. So I'm going to use something that might look a bit complicated to people.
So I'm defining where the first coordinate is which is June remember these are variables from here. So when this is the best and price it gets it to get the particular point on the graph that speaks to June price.
Now the next coordinate processing is XY X which is where we want to position the text.
So we can say June which is three is for the Y which speaks to Christ.
Christ the text based on the access.
So that's All right.
It's easier for you to know what Now the text identif where the text is. But now you will have a situation where the text is just sitting empty.
What we now want to do is to draw some kind of arrow from that text to that point where this So use our under the dictionary.
is the name of it has a dictionary of different recommenals.
I must follow.
This Don't use that.
So with my comments, do we understand >> what the different codes would do?
>> For standards, we're identifying the points and we're finding where the index for months the month that we want to point to. We're finding the index number. We're trying to identify what is the price that is tied to that index number. So now I found the point. We now want to understand okay what is the text we want to write in the annotation which is form subsidy was removed. Now we have put the text we have found the points where the text should point to. How do we point it now? Oh sorry where do we drop this text on our axis? Which location on our axis do we drop the text? Now we're saying the text is intended for June price or the point is supposed to be pointing to June price and the actual text itself based on this is the reference point. It should sit three spaces away from wherever June is on the x axis and then on the y ais it should sit um around - 230.
Then based on that empty space within it we want to draw a line and that line the style we are using is the arrow and the color we want to color it is red.
Then for the text itself, we want the text to be red and the weight of the text to be bold.
So if I were to run this my updated code now, sorry, I'll come back to the text.
I don't see type.
myself.
Have you catched the python?
Yay! I got >> checking your order. I've gotten my own.
Yes, I did.
use that thing.
>> Yes.
Don't >> do copy and paste. Amen.
my food.
For those of you that still open That Please go.
You're going to break it.
Good job.
This is how your outputs IP.
So the error was I call the annotate function and the annotate function is supposed to cover everything from here to here.
The only reason that because I was using comments I was breaking it. So I forgot and I went to put a bracket here and close the function. So all these other things did not run under that function.
>> Yeah. Because everything here speaks to annotation. So the bracket the first bracket and the end bracket is supposed to cover everything by now mistakenly close the bracket before the end.
I want to see.
But I remember that.
Yes, there I've taken.
>> I'm coming.
>> Is it feel like My pleasure.
>> You want to try something?
I left my image.
What's her name?
I will share with you.
How are you?
So I mean for those that feel the code is too hard. You can still export the picture and use arrow on your to put text.
But it's interesting. Seeing the final result >> seeing the final result is interesting.
>> Is what?
>> Interesting.
>> Oh yeah.
>> That's fine. That's fine. I'm just saying I just wanted to show you how to do it within Python itself.
I don't You're properizing Legos.
Okay.
Thank you.
Let's go.
You have to have three.
Even as your own white.
Come on. Come on.
guys.
Let me let me speak.
I don't understand.
We have Europa.
>> Yes.
like my side like why the culture is like that do We must come for you pick one or two Yeah.
smallest.
You were What do you have?
This is like I can speak your language.
answer.
>> Let's answer.
I didn't like talking.
>> No.
Thank you.
>> Okay.
I don't know.
All good.
Wow.
>> Okay.
to understand what they say. Because light from dark people.
>> But you are not What is not being It's like nothing else.
But then Why did they not come up?
Cannot Wait, I thought that came with all those How am I going to do that?
Honestly, this is just what I'm saying.
So they lowerend weather change.
>> Okay. He's part of it.
I see it by That would be very I'm telling you Yes, that's my son.
What time?
I hope that this is Are we did he walk?
Okay. So if you run your code, this would be the most likely output you will have.
Now >> before we proceed to the next >> before we proceed to the next thing that I would like to show us, let me just touch on one very little marginal thing here.
So and the reason I'm touching on this is so that in case you encounter that future that problem in future you will not say I only gave you testing and de without it from you >> so there's a problem we might have here you see this subsidy was removed if we want to make it longer let's Say for subsidy let's say we want to make it more detailed and say for subsidy was removed shortly your own language.
>> Are you seeing the problem I'm having?
>> Yeah, it's outside.
>> It's outside. So, if would be a good place to from kids instead of parents to a new life.
No, no, no, no, no. So, we know it's outside. I said >> sorry I don't know.
So I'm saying if you were typing this thing manually let's say on word and you saw how it came out and you didn't like it and you wanted to take a part of it to a new line. Which part of this thing will you prefer to press that enter key so that it goes to a new line.
So for you you say from here for you you say shortly.
>> Okay. So let's maybe work with shortly and see how. So the idea is to carry shortly and bring it here so that everything is a bit within the same. If you say it's general election you want, you can still when I show you what you do, you can still apply it to general election.
>> Yeah, >> it's the same thing. It's just how to enter a new line in a string because if you don't put this code, it won't be able to know that you want to enter a new line. So in front of shortly, I'm going to put the dash symbol.
I'm going to put the backward slash and end dash backward slash and n. These are the three things I put. So the end helps it know is a new line.
Python already recognizes this. any string where it puts this in front of that string, it will take it to a new line. So by the time we run this, >> have you seen the difference now?
>> So I said the dash symbol backward. Is this a forward slash or backward slash?
>> Slash.
>> Okay. backward slash end.
You don't need to copy what I wrote. You already know the context.
If you want to write it as subsidy was global from June 2023, the idea is to write a longer line. If you want to even go as far as writing by President Amed Tinu on his first day of office, no problem. The point is when you're adding a new line, just know that whatever you're using for it is dash backward slash and end. If you want to make it four lines, it means for every part you want to make into a new line, you're going to put these three just in front of that word.
So what if before you because I can see that you finish writing everything before you put um slash backward and shortly. What is your typing and you know exactly what will happen and you now put it and then continue your typing not necessarily finishing all the typing >> for Python the point is whenever it comes in contact with this combination in this order it doesn't matter where you put it that's how it treat it doesn't treat this as a normal string it knows that this is you saying I wants to go to a new line.
You understand? So even in the formal strings that we put if there's another place let's say we are trying to call the title of the table okay and in that title I put this thing in the title is still going to carry that title where I put it and go to a new line. So as far as tricks are concerned, this is how you go to a new line. This is the equivalent of enter on your keyboard.
So I just wanted us to see this so that if for whatever reason whatever you're doing is longer and it's now distorting your image, for you.
>> This is the standard.
And I'm not doubting it. I'm just saying no, you have to put the three together forward and end.
Okay. Okay.
So it's See, I always get confused.
>> This one is like the dash. So we're taking out the dash. So the main >> computer is usually >> to be honest sometimes I know it sometimes I don't know it. So it's Google that helps me simplify this matter. department will be responsible for.
So this backward slash because it's slanting backwards.
Okay. So that's the thing where okay I've never I've always been confused but I think that whatever Don't move.
Somewhere Anyway, that's very difficult. That's enough.
Oh yeah, you got Okay. So, we're going to move further now.
Um, as usual, in a bit not to confuse ourselves, >> let's copy this because we still want to build on this code.
>> She also disclosed she also economically Good job and women's day celebration app.
>> So for some people Some people this is as far as they might want their chart to go.
So what I'm going to show now is I mean I'm still going to edit this chart a bit further but let me say for whatever reason this is where you're satisfied with it with your visualization.
What you want to show now is how to save this particular chart >> that you have developed. Yeah.
>> So to save it >> this um information that we have can you still use SMS to get all this using this code now can you repeat it >> yesterday you cannot use all those This area, >> sorry.
When we were doing the edit for yesterday where we were trying to adjust the axis and all that we were calling on MAL library but for the basic edits on the color of the image it was se doesn't really give you too much customization options.
It's like he already has a preset that he it feels you need and he uses those presets for you. But if you want to go granular in your customization because I told you se is running on engine. So if you want to go granular you now have to go to the source where is using to generate it own visualization which is a math which is what we are using now to do our own visualization.
You understand? But if what you want is some basic standard basic standard charts and all that se already has those things automated. So if it's just for quick on this, quick on that, you can go to Corn for that.
>> But if you're developing a specific kind of report and you want to show as much details as possible, then you come to So that's why I decided to introduce this one second, that one first.
So now let's assume like I said you're already fed up with what you have done and you want to just save at this stage and export or at least share to your colleague to see give them an idea of what you have done so far.
What area of this thing do you feel we will be using? Will it be the axis of the figure?
>> If we want to see now remember from the beginning of our code I made reference to two things >> that there are two components in this whole thing. There's the axis and there's the figure.
>> If I want to say what I've done so far, what am I going to be calling between these two?
Okay, I just wanted to because I mean before you see the syntax I want us to be thinking like programmers too so that you also know why the code is following the pattern is following.
So now we're going to make reference to the fig and we're going to call on the save fig function and we can call this we can call it let me use their recommendation first. We can call it petroleum price.
So remember we agreed that we using want to save the figure.
So calling on the save fig configuration and this is where we name the file so that when we save it it carries this name.
Now if I remove this comma and I run it this will save. But remember when I said sometimes you might be saving for a different purpose. You might be saving for the purpose of if I if I save it like this to use the default saving settings. You understand? But it might be a chart that let's say you want to create on a poster and that way by the time you go to UTC and they print it, you will now see that your chart is not very sharp. You understand? In that case, I can now go as far as determining the quality of resolution I want it to save us. So that if for whatever reason the chart is not for normal digital share and is for external print when it stretches because of the pixel resolution I've set, it doesn't go out of place. So I might reach out to the person at UTC and ask them hey operating this kind of thing what is the recommended resolution that you people like to work with? You understand? They might tell me the number. All I now have to do is just enter that number as they told me. So the resolution is usually denoted as DPI.
So let's say I've spoken with them and they told me it should not be anything below 300 DPI.
I'll just put that number 300.
Yeah.
>> You understand? Like I said this thing is just so that it is print ready. If it was for digital share, I won't need to go as far as specifying that resolution.
The thing will save by default as a a picture that will be good enough for digital share. Then because it's also something I would like to print, I'm going to add a different command called box inches.
B box >> B boxes. Yes. Yes. Yes. That's correct.
>> Correct.
>> Yes.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











