Depending on which color card you are looking for, you might try something like
zmin=min(Z); zmax=max(Z); map=colormap; color_steps=size(map,1); hold on for i=1:color_steps ind=find(Z<zmin+i*(zmax-zmin)/color_steps & Z>=zmin+(i-1)*(zmax-zmin)/color_steps); plot(X(ind),Y(ind),'o','Color',map(i,:)); end
The find is a bit expensive, but it seems to be faster than a scatter . I am sure you could optimize this further.
RussH source share