Property of gscatter information needed
7 views (last 30 days)
Luna on 27 Nov 2019
Edited: Luna on 27 Nov 2019
Have you read that?
you don't have to mention a 'Name','Value' pair argument inputs for gscatter. It works like that:
gscatter(x,y,g). x and y is a same size vector and g is a grouping vector already.
Here is a demo:
x = rand(10,1);
y = rand(10,1);
g = [ones(5,1); ones(5,1)*2]; % first 5 values group number 1, last 5 values group number 2;
Image Analyst on 28 Nov 2019
There is no "Z" or third dimension for gscatter(). It's only x and y, NOT z.
The third input is what "group" the (x,y) points belong to, and that determines what color they get plotted in. For example group 1 appears with red markers and group 2 appears with green markers, or whatever.
If you want color with 3 dimensions (x, y, and z), I suggest you use plot3().