scatter plot with different colours

1 view (last 30 days)
myetceteramail myetceteramail
Edited: dpb on 14 Apr 2017
i have two vectors and i have a scatter plot of them. u and z are vectors from which i have taken the values
randIndex = randperm(numel(u));
randIndex = randIndex(1:5000);
uRand = u(randIndex);
zRand = z(randIndex);
corrcoef(uRand,zRand)
scatter(uRand,zRand)
now what i want to do is that i want x with a different colour and y as a different colour so that both of the vector points are distinguishable. How should i do it . Can somebody help??
  1 Comment
dpb
dpb on 14 Apr 2017
Edited: dpb on 14 Apr 2017
Not 'til can figure out what it is that you're trying to distinguish, precisely, no... :)
Who's x and y, precisely, and what distinguishes them on the plot? You've got one point at each coordinate and each of those points is from a particular point in the corresponding vector for the abscissa/ordinate--what's to distinguish one from the next?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!