In this lesson, we will discuss how to visualize the relationship between two numerical variables. For example price and quantity. In fact, first thing that we should do in our data when we have price and quantity to see whether law of demand holds. Law of demand states that as the price goes up the demand comes down for the product, make sense. Let's see, how much does it hold in our data. So the way you will visualize the relationship between two numerical variables is through a scatter plot, which is also called as a point object because it just represents each observation as a point in two dimensional space. So here we create a scatter plot between price and quantity. The way we go about creating a scatter plot is just changing the geom object. Because everything else is the same that we did in histograms or for any other geometric object data and the mapping are the same. So we are specifying which data frame do we want to use and which variables to have to go to which axis. And then that saved in P1 and then on top of P1, we are adding that we want to create a geometric object which is a point or a scatter plot. So when we do this we see this scatter plot. Now it's very difficult to really see much pattern because it looks almost like an l. And you would appreciate that this is likely because we have outliers especially on the higher side for both price and quantity. And they are sort of hiding the pattern there. So can we improve upon it? Certainly, but before that let's understand one more concept. So when you have a scatter plot, you can also add a line to it. So what I do here in this code is, on top of the geom point, I add another geometric object, which is a smooth line, which is just geom_smooth. And when I do this, we see a line, but it's almost like flat on the horizontal axis. So maybe when we log transform our variables, we will see a nicer pattern. Let's just see it in the data. So now what I am going to do is I'm going to create a scatter plot with a line with variables transformed on the log scale. So everything is same here except that I've put the quantity and price with their log values, geom_point and geom_smooth. So point is for getting those points and smooth is for getting the line. And here I am telling r that this line should be a straight line, a linear model has to be used just to make sure that it's a line and not a curve. And when I create this, we now see a much clearer pattern that emerge here. So line going down as we expect. So what did we learn in this lesson? We learned how to visualize the relationship between two numeric variables. We used price and quantity from our data and we had to do some transformation on the data to really catch the pattern there.