 Hello, welcome back. In this video, we're going to continue to talk about how we can create visualizations in Python using plot nine or ggplot. And in particular, we're going to focus on box plots in this video. All right, so we are back in the same visualization. So in this lab file, we've had our libraries continuing to use plot nine. We have our data that we went through in the first video to clean up and rename a number of columns. And now we're going to get into box plots. Once again, we're using ggplot, and I'm going to create this parentheses so I can enter down between options. So we start off with what we do for every ggplot object. And so we start off with ggplot survey. And then we have some kind of geome. And here, our geome is going to be box plot. And then we need to have our AES. And so the box plots in ggplot are a little bit different than some other box plots or some other plots. They do require both an X and a Y variable to be put within our AES parentheses. However, you can just state a single value such as zero for the X axis. And then here we need a quantitative variable for the Y axis, which we will use for credits. And then outside of the AES, we can add a fill. And let's just fill this one with pink. And we can run this. And we can see this box plot. And so we've got credits and we can use this, we can see where our median is, where our first and third quartile is, as well as the min and max. And this is sort of weird X axis that isn't necessarily the best to include because it has nothing to do with the data itself. And so if we wanted to change that we would need to work with a function called theme. You can use this to do about anything. You can change legends, you can change text, you can change the background. Here we're going to be using it to remove the X axis label, the X axis text, and the tick marks. So we'll start off with the title. So we can say axis, title, X. And so here we can add any number of things. We can change it. But what I'm going to do is say element blank. This will just say, you know, the X axis title, make it blank. And then the next we'll do is we'll do the text. So this is actually these numbers down here, negative point four, negative point two, zero, and so forth. So axis text X. And again, element blank. And then the last thing we wanted to remove where the tick marks. So we can say axis ticks. Major X. So you can start to see the pattern here. We tell it what bit of what part of the plot we're working with. So the axis. Then we tell it what part of the axis that we're working with here the title, the text, or the major ticks. And then we tell which axis we're doing. So when we run this, we can now see that we've taken away all of that that was on the X axis makes it look a little cleaner without that additional set of numbers that comes from the fact that we are forced to provide some X value. So this is how you can make a single box plot. But say you wanted to break up this box plot by credits so similar to our bar plot from that video, we want to look at how credits are separated by major. And so here, we can once again say ggplot with the survey data. We can say geom box plot. And now, because we actually have two variables that we're doing, we can give our categorical variable on the X axis. And our quantitative variable on the Y. And we can still fill with pink. And here we can see how each of these different majors varies within their major in terms of credit hours. So we can see the PG&E had the greatest variation in credit hours being taken. And as our other and these two majors represent a single variable point so not much, no variation there can see that they had less.