Hopefully this is possible to be done.
Say I have an 10×2 array called "matrix1" and another 10×1 array called "matrix2".
"matrix2" is only made up of 1's and 2's
Using scatterplot I can plot matrix1(:,1) vs matrix1(:,2) easily like so,
scatter(matrix1(:,1),matrix1(:,2))
BUT what I want is to use "matrix2" to colour code the plots. For example if a row in "matrix2" shows a "1" the corresponding row number in "matrix1" is blue on the scatter plot and if "matrix2" shows a "2" the corresponding row number in "matrix1" is red on the scatter plot.
Any ideas would be much appreciated. I have looked at gscatter and groupings but getting a bit lost!
Craig
Best Answer