How to group scatter plot data?

2 次查看(过去 30 天)
Rinu
Rinu 2013-10-24
I have three vectors x,y and z of the same length. How can I generate a scatter plot of x and y which is grouped according to the corresponding values of z (e.g. group 1 for z<10, group 2 for 10<=z<20 and group 3 for z>=20)? I'm thinking of using gscatter but for that I have to make a group vector first. Is there any way I can generate a vector "group" which is "1" for z<10, "2" for 10<=z<20 and "3" for z>=20? Any help is much appreciated.

回答(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