 Welcome back. So we're going to talk about how we can add a third variable to our bar plots today. So in the previous bar plot video, we showed how to get plot a categorical variable with counts on the y axis, and then a categorical variable with a quantitative variable on the y axis. But if you wanted to add a third variable, you could do that through adding fills, which is what we will demonstrate here using the plot nine or GG plot plotting tool. So we are here in the Google collab file that we started in the previous video, we've got our libraries, we've got our data that has already been read in. And at the end of the previous video we melted the data set and this will become very important when we go to use GG plot to make this bar plot. And so we can go ahead and just get started with our GG plot. So, similar to the previous videos. We start off with listing our data frame. And then we're still doing a bar plot so we say GM bar, and we still need an AES. So in the past, we specified an x axis will say category. We specified a y axis emissions. And then we did stat equals identity to say we want the actual data, we don't want to do any calculation on it. And then we added the fill outside of the AES. And that's how we got to variable plot. Remember, if you want to add a third variable, you need to do it within the AES statement. And so here, we say fill equals source. So if we run this. We can see that now we've got emissions, we've got category, and we've got source. And it automatically creates this legend for us. So we don't need to worry about that. And we can see how it works. Now this plot isn't the most descriptive, nor is it the most readable. And so, to show you a few other things that you can do within GG plot. Flip the coordinates with cord underscore flip. So if we run that. We can see that now, because it's on the y axis we can actually read what those categories are, which makes it a lot nicer. And then we can actually add some labels. So we can say X slave equals emissions scenario, and note that I said X label, it needs to follow whatever you mapped your x value to in the AES statement. So in this case, when I run this, the X label is actually on the why, because I flipped those coordinates, but the program is able to track where you, which value you coded as the X value and attach the actual value to it. So we know that that's what value you mean when you do the label instead of assuming that it goes on the X axis automatically. So instead of tracking a specific axis at this point, we're tracking a variable and the program knows where to put that label based off of the variable. And so this is an example of how you can add a third fill based variable to your bar plots.