>> help hist HIST Histogram. N = HIST(Y) bins the elements of Y into 10 equally spaced containers and returns the number of elements in each container. If Y is a matrix, HIST works down the columns. N = HIST(Y,M), where M is a scalar, uses M bins. N = HIST(Y,X), where X is a vector, returns the distribution of Y among bins with centers specified by X. Note: Use HISTC if it is more natural to specify bin edges instead. [N,X] = HIST(...) also returns the position of the bin centers in X. HIST(...) without output arguments produces a histogram bar plot of the results. See also HISTC. Overloaded methods help fints/hist.m >> [n,x]=hist(randn(1000,1),50); >> >> h=bar(x,n) h = 101.0016 >> get(h) AlphaDataMapping = scaled CData = [ (4 by 50) double array] CDataMapping = scaled FaceVertexAlphaData = [] FaceVertexCData = [ (251 by 1) double array] EdgeAlpha = [1] EdgeColor = [0 0 0] EraseMode = normal FaceAlpha = [1] FaceColor = flat Faces = [ (50 by 4) double array] LineStyle = - LineWidth = [0.5] Marker = none MarkerEdgeColor = auto MarkerFaceColor = none MarkerSize = [6] Vertices = [ (251 by 2) double array] XData = [ (4 by 50) double array] YData = [ (4 by 50) double array] ZData = [] FaceLighting = flat EdgeLighting = none BackFaceLighting = reverselit AmbientStrength = [0.3] DiffuseStrength = [0.6] SpecularStrength = [0.9] SpecularExponent = [10] SpecularColorReflectance = [1] VertexNormals = [ (251 by 3) double array] NormalMode = auto BeingDeleted = off ButtonDownFcn = Children = [] Clipping = on CreateFcn = DeleteFcn = BusyAction = queue HandleVisibility = on HitTest = on Interruptible = on Parent = [100.001] Selected = off SelectionHighlight = on Tag = Type = patch UIContextMenu = [] UserData = [] Visible = on >> E=eye(4) E = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 >> x=1:4; y=(1:4)'; >> h=pcolor(x,y,E) h = 101.0022 >> set(gca,'ydir','reverse') >> shading('faceted') >> shading('flat') >> shading('interp') >> set(h,'edgecolor','w') >> clear >> >> >> ls ans = NWtopex.mat lec05.pdf lec05.ppt lec05diary.txt log10_24.txt >> load NWtopex >> whos Name Size Bytes Class SSH 31x66 16368 double array ans 1x77 154 char array lat 1x31 248 double array lon 1x66 528 double array rkb 256x3 6144 double array Grand total is 2988 elements using 23442 bytes >> h=pcolor(lon,lat,SSH); >> colorbar >> shading('interp') >> caxis([-55 55]) >> colorbar >> colormap(rkb) >> colormap ans = 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 0.9933 0 0 0.9866 0 0 0.9798 0 0 0.9731 0 0 0.9664 0 0 0.9597 0 0 0.9529 0 0 0.9462 0 0 0.9395 0 0 0.9328 0 0 0.9261 0 0 0.9193 0 0 0.9126 0 0 0.9059 0 0 0.8992 0 0 0.8924 0 0 0.8857 0 0 0.8790 0 0 0.8723 0 0 0.8655 0 0 0.8588 0 0 0.8521 0 0 0.8454 0 0 0.8387 0 0 0.8319 0 0 0.8252 0 0 0.8185 0 0 0.8118 0 0 0.8050 0 0 0.7983 0 0 0.7916 0 0 0.7849 0 0 0.7782 0 0 0.7714 0 0 0.7647 0 0 0.7580 0 0 0.7513 0 0 0.7445 0 0 0.7378 0 0 0.7311 0 0 0.7244 0 0 0.7176 0 0 0.7109 0 0 0.7042 0 0 0.6975 0 0 0.6908 0 0 0.6840 0 0 0.6773 0 0 0.6706 0 0 0.6639 0 0 0.6571 0 0 0.6504 0 0 0.6437 0 0 0.6370 0 0 0.6303 0 0 0.6235 0 0 0.6168 0 0 0.6101 0 0 0.6034 0 0 0.5966 0 0 0.5899 0 0 0.5832 0 0 0.5765 0 0 0.5697 0 0 0.5630 0 0 0.5563 0 0 0.5496 0 0 0.5429 0 0 0.5361 0 0 0.5294 0 0 0.5227 0 0 0.5160 0 0 0.5092 0 0 0.5025 0 0 0.4958 0 0 0.4891 0 0 0.4824 0 0 0.4756 0 0 0.4689 0 0 0.4622 0 0 0.4555 0 0 0.4487 0 0 0.4420 0 0 0.4353 0 0 0.4286 0 0 0.4218 0 0 0.4151 0 0 0.4084 0 0 0.4017 0 0 0.3950 0 0 0.3882 0 0 0.3815 0 0 0.3748 0 0 0.3681 0 0 0.3613 0 0 0.3546 0 0 0.3479 0 0 0.3412 0 0 0.3345 0 0 0.3277 0 0 0.3210 0 0 0.3143 0 0 0.3076 0 0 0.3008 0 0 0.2941 0 0 0.2874 0 0 0.2807 0 0 0.2739 0 0 0.2672 0 0 0.2605 0 0 0.2538 0 0 0.2471 0 0 0.2403 0 0 0.2336 0 0 0.2269 0 0 0.2202 0 0 0.2134 0 0 0.2067 0 0 0.2000 0.2000 0 0 0.2067 0 0 0.2134 0 0 0.2202 0 0 0.2269 0 0 0.2336 0 0 0.2403 0 0 0.2471 0 0 0.2538 0 0 0.2605 0 0 0.2672 0 0 0.2739 0 0 0.2807 0 0 0.2874 0 0 0.2941 0 0 0.3008 0 0 0.3076 0 0 0.3143 0 0 0.3210 0 0 0.3277 0 0 0.3345 0 0 0.3412 0 0 0.3479 0 0 0.3546 0 0 0.3613 0 0 0.3681 0 0 0.3748 0 0 0.3815 0 0 0.3882 0 0 0.3950 0 0 0.4017 0 0 0.4084 0 0 0.4151 0 0 0.4218 0 0 0.4286 0 0 0.4353 0 0 0.4420 0 0 0.4487 0 0 0.4555 0 0 0.4622 0 0 0.4689 0 0 0.4756 0 0 0.4824 0 0 0.4891 0 0 0.4958 0 0 0.5025 0 0 0.5092 0 0 0.5160 0 0 0.5227 0 0 0.5294 0 0 0.5361 0 0 0.5429 0 0 0.5496 0 0 0.5563 0 0 0.5630 0 0 0.5697 0 0 0.5765 0 0 0.5832 0 0 0.5899 0 0 0.5966 0 0 0.6034 0 0 0.6101 0 0 0.6168 0 0 0.6235 0 0 0.6303 0 0 0.6370 0 0 0.6437 0 0 0.6504 0 0 0.6571 0 0 0.6639 0 0 0.6706 0 0 0.6773 0 0 0.6840 0 0 0.6908 0 0 0.6975 0 0 0.7042 0 0 0.7109 0 0 0.7176 0 0 0.7244 0 0 0.7311 0 0 0.7378 0 0 0.7445 0 0 0.7513 0 0 0.7580 0 0 0.7647 0 0 0.7714 0 0 0.7782 0 0 0.7849 0 0 0.7916 0 0 0.7983 0 0 0.8050 0 0 0.8118 0 0 0.8185 0 0 0.8252 0 0 0.8319 0 0 0.8387 0 0 0.8454 0 0 0.8521 0 0 0.8588 0 0 0.8655 0 0 0.8723 0 0 0.8790 0 0 0.8857 0 0 0.8924 0 0 0.8992 0 0 0.9059 0 0 0.9126 0 0 0.9193 0 0 0.9261 0 0 0.9328 0 0 0.9395 0 0 0.9462 0 0 0.9529 0 0 0.9597 0 0 0.9664 0 0 0.9731 0 0 0.9798 0 0 0.9866 0 0 0.9933 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 1.0000 0 0 >> colorbar >> g=get(gcf,'children') g = 107.0002 100.0010 >> get(g(1),'type') ans = axes >> get(g(2),'type') ans = axes >> whos lat lon Name Size Bytes Class lat 1x31 248 double array lon 1x66 528 double array Grand total is 97 elements using 776 bytes >> clf >> h=pcolor(lon(1:2:66),lat(1:2:31),SSH(1:2:31,1:2:66)); >> set(gcf,'renderer','zbuffer') >> set(gcf,'renderer','opengl') >> diary off