‫Okay.
‫I'll come back.
‫So in the last video, we said that there were two options for subplots.
‫But the beautiful thing is that we can use the same command we've been using for single plots to create
‫subplots.
‫So we've seen a preview of option one.
‫Let's do option two just because if you come across these, I want you to be aware of it.
‫Option two.
‫In your research, you might see both of these come up.
‫So that's why we're checking out two different ways.
‫Do you have to use two different ways?
‫No, you don't.
‫We'll probably stick to using option one throughout the rest of the series.
‫But this is just so you know what's going on.
‫So go figure.
‫AX Whoa.
‫This syntax looks different already.
‫This is just like we're making one.
‫But rest assured, we are creating subplots and rows, so end calls equals two.
‫And then we want fig size.
‫We're just replicating what's here.
‫You could copy and paste and delete it.
‫But again, remember, we're always in the habit of rewriting code and we want here plot to each different
‫axis.
‫Now this is kind of the, I guess you could say the tuple way and this is the list index way, this
‫other option.
‫Yeah maybe we do that each different index to prevent confusing here so we want ax zero zero now can
‫you guess before we even plot anything.
‫What is this doing.
‫So if I do this fig ax equals plot, subplots and rows equals two and kohls equals two.
‫If we were to index into this ax for zero zero, can you guess which one of these four?
‫Because we're creating the same this code here and this code here does the same thing except for variable
‫names.
‫What are we going to plot to if we pass these index coordinates?
‫Zero zero, row zero, column zero.
‫Well, let's say and find out.
‫No cheeky reveals here unless we've run the code.
‫There we go.
‫Okay, so it's just the same as this here.
‫But then if we go, let's do the same thing.
‫So if we want zero one, I want to scatter and we're just going to do the same.
‫Random, random.
‫I believe it was ten.
‫Random, random.
‫Wonderful.
‫Well.
‫There we go.
‫So, again, these plots are different because it's it's random.
‫So these scatter plots, same thing, numbers between zero and ten or one and ten.
‫But because we're calling different random ones, they're going to appear randomly.
‫So each time we run this probably have a different, different plot.
‫There we go.
‫But all this is saying is access row zero and plot on column one.
‫So column zero, column one.
‫There we go.
‫And so now you can probably guess what's going to happen next if we go one and zero dot bar and we want
‫not better prices.
‫Beautiful.
‫All this talk of nut bottles is making me hungry.
‫Might have to do that after this item.
‫Prices.
‫And that's a beautiful thing about owning a nut butter store, right?
‫Is that you can just eat your own supply.
‫Not too much, though, because we need to still make profits.
‫We're going to do two at the same time here.
‫Hist rand rn.
‫That's what I want.
‫There we go.
‫But you see what we've done, we've, we've gotten a semi-colon there and now there we go.
‫So we've created the same plot here, same subplot using two different types.
‫I personally prefer option one because it's a bit more readable for me.
‫If I look at something like this, you may prefer option to list.
‫Indexing can be helpful in some scenarios.
‫It's all about just trying it out and see how you go.
‫But I think I think we'll stick with option one for the rest of the map pop lib section.
‫So that's just to show the two different ways of doing subplots with the same command here.
‫Plot dot subplots.
‫All right.
‫So now we've seen different ways of plotting directly from NumPy arrays, but it's most likely most
‫of your planning will probably take place from a pandas data frame.
‫So we've seen pandas data frames in the past, and we know that they're built on top of numpy arrays.
‫And we know that map plot lib plots are built on numpy arrays.
‫So let's see how this synergy works.
‫I'll see you in the next video.