Plotting a grouped 2 dimensional vector in MATLAB

Posted by Hossein on Stack Overflow See other posts from Stack Overflow or by Hossein
Published on 2010-05-11T16:43:37Z Indexed on 2010/05/11 18:24 UTC
Read the original article Hit count: 200

Filed under:
|
|

I am trying to make a plot of a 2-dimensional vector (2D Plot). But I don't want all the datapoints to have the same color on the plot. Each datapoint corresponds to a group. I want to have different colors for each group of datapoints.

class=[1 3 2 5 2 5 1 3 3 4 2 2 2]

says each datapoint belongs to which group

X=[x1,y1;x2,y2;x3,y3;.....] 

the number of these datapoints are the same as the number of elements in the class vector.

Now I want to plot these based on colors.

© Stack Overflow or respective owner

Related posts about matlab

Related posts about plot