# using scatter function with distinguishing 32 scatter plots in 1 figure

1 view (last 30 days)
sermet on 18 Feb 2016
Answered: Walter Roberson on 18 Feb 2016
I have 32 vectors and another 32 vectors which are need to be plotted with scatter function against to each other. How can I use scatter function to properly distinguish each vector in 1 figure? I tried following way;
figure;
scatter(vector_1, vector_2, 'b^')
hold on;
scatter(vector_2, vector_3, 'r^')
.......
But the total number of color and/or marker symbol are not enough to append each vector differently.

Walter Roberson on 18 Feb 2016
For each scattergroup object (the result of one call to scatter), for N points you have:
• Marker can be only one string such as 'o' or 'square'
• SizeData can be a vector of length N, one per point
• MarkerFaceColor can be 'none', or 'flat', or 'auto', or a single string naming a color to be used for all points, or a single RGB triple to be used for all points. The default is 'none' and 'auto' has the same effect as 'none'. If 'flat' is chosen then CData is used
• MarkerEdgeColor can be 'none', or 'flat', or 'auto', or a single string naming a color to be used for all points, or a single RGB triple to be used for all points. The default is 'flat', and 'auto' has the same effect as 'none'. If 'flat' is chosen then CData is used
• CData can be an Nx3 array of colors, one per point. It has no effect unless one of MarkerEdgeColor or MarkerFaceColor is 'flat'
Therefore for any one call to scatter, you can set a different color for each point and you can set a different size for each point, but the call can only have one MarkerEdgeColor and one Marker shape.
There are 7 relatively distinguishable colors, 'r', 'g', 'b', 'c', 'm', 'k', 'y' (white, 'w', is typically not distinguishable)
There are 9 relatively distinguishable shapes, '*', '+', '^', 'v', '<', '>', 'o', 'x', 's' (square), and there are also 'p' (pentagon) and 'h' (hexagon) which tend to be harder to make out unless larger marker sizes are used
The obvious color and shape combinations alone give 63 combinations.
To those you can also add marker edge colors. However, I tend to find that not many of those combinations are easily to read.
I do not tend to use marker size to distinguish datasets: I tend to use marker size to indicate significance or proportion of some kind.