scatter plot with different colours

1 次查看(过去 30 天)
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 个评论
dpb
dpb 2017-4-14
编辑:dpb 2017-4-14
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?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by