Back to home page

MITgcm

 
 

    


Warning, /utils/matlab/cs_grid/latloncap/quikpcolor.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 0524fa3d on 2013-09-10 13:34:26 UTC
0524fa3d09 Dimi*0001 function quikpcolor(x,y,z)
                0002 % quikpcolor(x,y,z)     simulate pcolor using image (much faster)
                0003 
                0004 if nargin == 1
                0005   h=image(x,'CDataMapping','scaled');
                0006 elseif nargin ==3
                0007   dx=diff(x);
                0008   dy=diff(y);
                0009   if min(dx)==max(dx) & min(dy)==max(dy)
                0010     h=image(x,y,z,'CDataMapping','scaled');
                0011   else
                0012     dx=min(x):min(abs(dx)):max(x);
                0013     dy=min(y):min(abs(dy)):max(y);
                0014     dz=interp2(x,y,z,dx,dy');
                0015     h=image(dx,dy,dz,'CDataMapping','scaled');
                0016   end
                0017 else
                0018   error('wrong number of arguments')
                0019 end 
                0020 set(gca,'ydir','normal')