Here is a trivial scatter plot that uses the default marker size (S=) and a vector C to assign three colors according to the current colormap.
M = magic(3);
S = ;
C = [1;1;1;2;2;2;3;3;3];
Is there a simple way to create a legend to the three colors?