Hi Joel,
The “scatter” function in MATLAB has a functionality by which you can pass a third parameter along with the x-axis and y-axis variables. This third parameter is mapped to a colour scale and the plotted x-axis and y-axis values are coloured accordingly.
This example on the documentation page of “scatter” shows the same functionality - https://in.mathworks.com/help/matlab/ref/scatter.html#:~:text=Create%20a%20scatter%20plot%20and%20vary%20the%20circle%20color.
In your use-case, you need to set the following variables like so:
“x”: The number of households that are combined.
“y”: “AAG”
“c”: “AAI”
You can then use the “colorbar” command to display the colour scale graph on your plot - https://www.mathworks.com/help/matlab/ref/colorbar.html.