cmap = colormap('jet') ;
% cmap 可以先存起来
% (default 为 6-bit colormap,想要更多色彩请再自行内插)
a = max(cdata) ;
b = min(cdata) ;
h = zeros(ndata,1) ;
markersize = 5 ;
figure ;
for i = 1:ndata
v = (cdata(i)-b)/(b-a) ;
k = round(v*size(cmap,1)) ;
h(i) = line(X(i),Y(i),'marker','o','markerfacecolor',cmap(k,:),...
'markersize',markersize) ;
hold on
end