You can use SCATTER to easily create data with different colors. I agree with @gnovice to use classIDinstead class, by the way.
scatter(X(:,1),X(:,2),6,classID); %
EDIT
, @yuk, @gnovice.
GSCATTER
%
hh=gscatter(randn(100,1),randn(100,1),randi(3,100,1),[],[],[],'on');
%
set(hh(1),'DisplayName','some group')
%
X = randn(100,2);
classID = randi(2,100,1);
classNames = {'some group','some other group'}; %
colors = hsv(2); %
%
figure
hold on
for i=1:2 %
id = classID == i;
plot(X(id,1),X(id,2),'.','Color',colors(i,:),'DisplayName',classNames{i})
end
legend('show')
, .