Home how to scatter (or) plot group color matlab
Reply: 0

how to scatter (or) plot group color matlab

user635
1#
user635 Published in April 24, 2018, 8:40 am

I have the data matrix M size N by 3 where

M(:,1) and M(:,2) are the point represent in x,y axis and M(:,3) represent the group assign number

I try to use scatter plot that plot color differently according to the group assign

figure;
scatter(M(:,1) , M(:,2) , 3 ,?????? ,'fill');

I was confused to assign the group number into the color assignment by create another color representation group array C where C is matrix g by 3 ( g is a number of group and 3 represent color array element between 0-1)

I try ????? = C(M(:,3),:) but it didn't work

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.308956 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO