Home > SurfStat > SurfStatColLim.m

SurfStatColLim

PURPOSE ^

Sets the colour limits for SurfStatView.

SYNOPSIS ^

function cb = SurfStatColLim( clim );

DESCRIPTION ^

Sets the colour limits for SurfStatView.

 Usage: cb = SurfStatColLim( clim );

 clim = [min, max] values of data for colour limits.

 cb   = handle to new colorbar.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function cb = SurfStatColLim( clim );
0002 
0003 %Sets the colour limits for SurfStatView.
0004 %
0005 % Usage: cb = SurfStatColLim( clim );
0006 %
0007 % clim = [min, max] values of data for colour limits.
0008 %
0009 % cb   = handle to new colorbar.
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

Generated on Fri 26-Sep-2008 14:05:29 by m2html © 2003