function h=plotcolor(x,y,val,STR,Cmin,Cmax);
% scatter plot with color point
% x,y,val, (x,y) and value
% STR - string for pint marker
% Cmin Cmax for caxis
if nargin<6
 Cmin=min(val);
 Cmax=max(val);
end
if nargin<4
 STR='o';
end
map=colormap(jet);
n=length(map(:,1));
SCALE=(Cmax-Cmin)/(n-1);
C=1+floor((val-Cmin)/SCALE);
C(C<1)=1;
C(C>64)=64;
hold on
for k=1:length(x)
 h(k)=plot(x(k),y(k),STR,'MarkerFaceColor',map(C(k),:));
end
patch(x(1),y(1),0);  
caxis([Cmin,Cmax])
colorbar
