/[MITgcm]/MITgcm_contrib/high_res_cube/matlab-grid-generator/bin/mycontourf.m
ViewVC logotype

Annotation of /MITgcm_contrib/high_res_cube/matlab-grid-generator/bin/mycontourf.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Nov 11 18:08:08 2003 UTC (21 years, 8 months ago) by cnh
Branch point for: MAIN, initial
Initial revision

1 cnh 1.1 function [c,h]=mycoutourf(x,y,a,ci,varargin)
2     % mycontourf(x,y,a,ci)
3    
4    
5     % Choose contour levels
6     if prod(size(ci))==1
7     amin=min(min(a));
8     amax=max(max(a));
9     cmin=floor(amin/ci)*ci;
10     cmax=ceil(amax/ci)*ci;
11     if cmin==cmax
12     error(sprintf('cmin=cmax=%g',cmin));
13     end
14     if cmin<0 & cmax>0
15     cmax=max(abs([cmin cmax]));
16     cmin=-cmax;
17     end
18     CI=cmin:ci:cmax;
19     else
20     CI=ci;
21     end
22     cmin=min(CI);
23     cmax=max(CI);
24    
25     [c,h]=contourf(x,y,a,CI,varargin{:});
26     caxis([cmin cmax]);

  ViewVC Help
Powered by ViewVC 1.1.22