Global Index (short | long) | Local contents | Local Index (short | long)
cont1d_stereo(aray,lev,mstyle,origin,lab)
mcont(data, levs, mstyle, origin) You may omit mstyle and origin and mcont will contour using polar stereographic with the North Pole as the origin.
function cont1d_stereo(aray,lev,mstyle,origin,lab) aray = squeeze(aray); hold off global XAX YAX FRAME x_coasts y_coasts; if nargin == 2 mstyle = 'stereo'; origin = [90 270]; lab = 0; elseif nargin == 3 if isstr(mstyle); if strcmp(mstyle, 'stereo') origin = [90 270]; elseif strcmp(mstyle, 'giso') origin = [0 mean(FRAME(1:2))]; else origin = [0 180]; end lab = 0; elseif (length(mstyle) == 2); origin = mstyle; mstyle = 'stereo'; lab = 0; elseif (length(mstyle) == 1); lab = mstyle; mstyle = 'stereo'; origin = [90 270]; end elseif nargin == 4 if (length(origin) == 1); lab = origin; origin = [0 180]; else lab = 0; end elseif nargin == 5 if isstr(lab); eval(['hold ' lab]); lab = 0; end end if isscalar(lev); levs = sort([-lev:-lev:min(min(aray)) lev:lev:max(max(aray))]); else levs = lev; end if ismap if ~ishold; clma end else if ~ishold; cla end end if strcmp(mstyle, 'stereo'); axesm('MapProjection',mstyle,'origin',origin,'grid','on', ... 'MapLatLimit', FRAME(3:4), 'MapLonLimit', FRAME(1:2), ... 'FLatLimit', FRAME(3:4), 'FLonLimit', FRAME(1:2)); else axesm('MapProjection',mstyle,'origin',origin,'grid','on', ... 'MapLatLimit', FRAME(3:4), 'FLatLimit', FRAME(3:4)); end [xk, yk] = keep_var(FRAME, XAX, YAX); if (FRAME(2)-FRAME(1) == 360); aray2 = [aray(yk,:) aray(yk,1)]; XAX2 = [XAX;XAX(1)+360]; else aray2 = aray(yk, xk); XAX2 = XAX(xk); end YAX2 = YAX(yk); pncontm(XAX2,YAX2,aray2,levs,lab,'k'); %contorm(YAX,XAX2,aray2); %clabel(c); drawmapm if ~strcmp(lower(mstyle), 'stereo') setm(gca, 'maplonlimit', FRAME(1:2), 'maplatlimit', FRAME(3:4)) % setm(gca, 'flonlimit', FRAME(1:2), 'flatlimit', FRAME(3:4)) else diff_frame = FRAME(4)-FRAME(3); axis(diff_frame/90 * [-2 2 -2 2]); setm(gca, 'FLatLimit', abs(FRAME(3:4)), 'MapLatLimit', FRAME(3:4)); end