scatter plot with different colours

1 Ansicht (letzte 30 Tage)
myetceteramail myetceteramail
Bearbeitet: dpb am 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 Kommentar
dpb
dpb am 14 Apr. 2017
Bearbeitet: dpb am 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by