 Here we are in the next tutorial, we're going to look at the scatter plot. First of all, my cascading style sheet, let's run that, and we have this notebook that looks a bit better. Scatter Plots, let's set up our Plotly Library. As per usual, we're going to import iPots so that we can plot right inside of the notebook and we've got to initialize this notebook mode, so we're going to import it and then we're going to execute that function with these parentheses there. I should say we're also going to import the high-level chart objects, so plotly.graph objects as go, go there. We go, indeed. We're going to import the numerical Python library, so numpy, and we're going to use the abbreviation np, and then we're going to seed this seeder number generator. So let's go numpy.random.seed. Let's create a bit of data, some data point values for us to work with. We're going to have one, two, three, four, and then five, six, seven, eight computer variables here, female age, male age, so we're going to stick to just for the sake of ease of explanation, just to this binary way of looking at gender, so only female and male, and we are going to have female. So let's create these data points. We're going to have female age and male age, so just for the sake of ease of explanation here, stick to this binary view of gender, so only female and male. We have the age there, we have salary, and we have debt. So female age is going to be from a random integer with a load of 20, a high of 65, and 100 values, and then the same for males. The salary, we're just going to play a bit. So we're going to take female age, and we're going to add to that random uniform value from negative 10 to 10, and add another thousand. So this is going to be element wise, so for each element in the list of 100 values that we have here in this numpy array, we're going to add the corresponding value in this uniform value of 100 and add another thousand, and we're going to do the same to male salary there, and then we're going to have female debt equals male debt, so that's the way to make two computer variables and make them exactly the same as each other, and that's going to be a random integer from 15 to 30 with 100 values, so instead of using the keyword name saying low equals high equals, because these are normal keywords, you don't actually have to use the names, and so it's 15, 30, 100, and then the tax, we're going to create some of those and again just add 10 to each of those values. So let's run that, let's do a bare bone scatter plot, that's what it's all about, so we're going to go go dot scatter, scatter being this high level plot that we can use, what is created on top of our figure, and we're going to use x equals female age, y equals female salary, so when you see here with a scatter plot, it's numerical variable against numerical variable, and each one of them will be each dot that we create in the scatter plot will be part of a pair, and the mode that we're going to use is just markers, and data equals trace, so just this trace part of a list, and we're going to use this key value pair of a Python dictionary to pass it to the i plot, and let's run that, and there we can see the way that we created it by adding those values, that there's some sort of correlation between what we have at the bottom edge and the salary on the left inside the y-axis that we can see here, so those are quite small dots, we can really do something about that, so let's change these markers, so I'm going to have mode still being markers, but then for marker we're going to pass a dictionary of values, so the dict function here in Python, so the size being 12, and the marker being this orange color with a bit of opacity there, only 90% of the opacity, and let's change the layout, so the way that I'm going to use layout here is again as a Python dictionary, so we're going to have title being correlation between female, age, and salary, the x-axis is the key, the value is another dictionary with a couple of key value pairs, title being age, and zero line being false, and with a y-axis title being salary, and the zero line being false as well, and the i plot, the data is data, and the layout is layout, as per usual, there we go, so now we have an x-axis title here, a y-axis title, we have a title here at the top, correlation between female, age, and salary, and we see these much larger orange dots, and if I just hover on one you can see that the value for that one was 1039, and the age was 34 that we can see at the bottom, we can change that, and now we can see them plotted, the hover there being 31, the age, and 1021 being the salary, 0.161, so let's do more than one dataset, so for that I'm going to create two separate traces, and one being the female, one being male, and again it's age against salary, I think you know what's going on here now, data will be the list of the two traces, and the data I'm going to just pass the data that I've created here, this list of the two traces, to the data key value in my dictionary here, and we can i plot that, so there we go, we've got female and orange, and the male in this blue, and we can see all the values as we go up, we can see this beautiful correlation between age and salary there, so let's add a third variable in this 2d space, and that's what scatter plots are all about, and I can do that in a few ways, one is by marker size, and the other one is by marker color, so let's start with this marker color, and that's to introduce a color scale, and you can see all the color scales that are available, grays, and this and that, and that, and that, and that, etc, we can use Portland, there's Portland there, so we're going to create a trace, and it's x equals female age, y equals female salary, mode being markers, the marker being a dict of the size of 10, the color is, color is going to be the female debt, and the color scale is Portland, so we have age, salary, and debt, all in the same 2d plot, and that's going to create a scale on the right hand side, a color scale, and we want that scale to be true, look at the layout, what we've done there, let's do the i plot, there we go, and now we've added this third variable, because we've got age and salary, but this color is also going to be this color that we introduced here as the debt level, so down from 16 up here, 28, so these red ones have more debt, say, than these blue markers here, so that's one way to introduce a third variable, the other one is just by way of what we would know as a bubble chart actually, but that's just the marker size, so what we're going to do here is just change from female to male, and the marker is going to be the size of the marker as passed as a part of a dictionary here, and we give it a color, let's have a look at this, so now we see that this debt is now the size of these, so the larger the size, the larger the debt, so that's one extra way of bringing in this third variable, so that means we can actually have four variables that we plot in 2D space, because we can just combine the color scale and the size, so here I've made the size, the debt, and the color, the tax, so that I have four variables actually drawn right here in my two-dimensional scatter plot, and that's actually quite fantastic to do, so we've added this four variables just in this flat file by just looking at this bubble size, the marker size, and then the color scale, and you can see there the size was the debt and the scale here was the tax, so higher the tax value here the more brown these values are, and we've again used earth, this time we've used earth just as the color scale that we have on the right-hand side, so have a lot of fun with your scatter plots, you can nearly convey a lot of interesting information just using scatter plots, I'll see you in the next, in the next tutorial, please remember to subscribe and hit the bell so that you can receive notification of all the tutorials that I do upload to YouTube.