0001 function cb = SurfStatColLim( clim );
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 a=get(gcf,'Children');
0012 k=0;
0013 for i=1:length(a)
0014 tag=get(a(i),'Tag');
0015 if strcmp(tag,'Colorbar')
0016 title=get(get(a(i),'Title'),'String');
0017 delete(a(i));
0018 end
0019 if length(tag)>12 & strcmp(tag(1:12),'SurfStatView')
0020 k=k+1;
0021 set(a(i),'CLim',clim);
0022 end
0023 end
0024
0025 if k==1
0026 cb=colorbar;
0027 else
0028 cb=colorbar('location','South');
0029 set(cb,'Position',[0.35 0.085 0.3 0.03]);
0030 set(cb,'XAxisLocation','bottom');
0031 end
0032 h=get(cb,'Title');
0033 set(h,'String',title);
0034
0035 return
0036 end