Colormap function for SurfStatView. Usage: SurfStatColormap( map ); Same as for matlab's colormap function - see help colormap.
0001 function SurfStatColormap( map ); 0002 0003 %Colormap function for SurfStatView. 0004 % 0005 % Usage: SurfStatColormap( map ); 0006 % 0007 % Same as for matlab's colormap function - see help colormap. 0008 0009 colormap(map); 0010 a=get(gcf,'Children'); 0011 k=0; 0012 for i=1:length(a) 0013 tag=get(a(i),'Tag'); 0014 if strcmp(tag,'Colorbar') 0015 cb=a(i); 0016 end 0017 if length(tag)>12 & strcmp(tag(1:12),'SurfStatView') 0018 k=k+1; 0019 end 0020 end 0021 0022 if k>1 0023 set(cb,'location','South'); 0024 set(cb,'Position',[0.35 0.085 0.3 0.03]); 0025 set(cb,'XAxisLocation','bottom'); 0026 end 0027 0028 return 0029 end