Documentation of plot_3d


Global Index (short | long) | Local contents | Local Index (short | long)


Help text

  lim(i) = max(max(max(max(tcor(i,:,:,:)))));

Cross-Reference Information

This script calls

Listing of script plot_3d


clear
cd ~/matlab/CSIRO/Thesis/Data
load LP9_detrend_L1-7_EOF_yr101-1000.mat; pcs = 1*pcs;
lims = [105 290 -40 40];
tim = 101:1000;
lags = -16:10;
temp = getnc('temp', lims, 1:10, tim);
[lat, lon, depth, lm] = getll('temp', lims);
[b, a] = butter(9, 2/9);
temp = filtfilt(b, a, temp);
[treg, tcor] = regress_eof(temp, pcs, lags);
[x, y, z] = meshgrid(lon, lat, -depth);
[nlag, nlev, nlat, nlon] = size(tcor);
for i = 1:nlag;
  lim(i) = min(min(min(min(tcor(i,:,:,:)))));
%  lim(i) = max(max(max(max(abs(tcor(i,:,:,:))))));
end;
lim = -2*lim/3;

lim = [.15 .15 .15 .16 .2 .23 .25 .45 .6];
lim = [.08 .08 .08 .1 .1 .1 .13 .2 .3];
lim = .1*ones(1, nlag);

M = moviein(nlag);

figure(1); fl(1); clf;
for i = 1:nlag
  clf
  tem = shiftdim(squeeze(tcor(i,:,:,:)), 1);
%  pw = patch(isosurface(x, y, z, tem, lim(i)));
  pc = patch(isosurface(x, y, z, tem, -1*lim(i)));
%  isonormals(x,y,z,tem,pw);
  isonormals(x,y,z,tem,pc);
%  set(pw, 'FaceColor', 'blue', 'EdgeColor', 'none');
  set(pc, 'FaceColor', 'red', 'EdgeColor', 'none');
  axis([120 300 -40 40 -500 0]);
  view(120, 60);
  grid on;
  camlight;
  lighting phong
  title(['Lag = ' num2str(lags(i))])
  M(:,i) = getframe;
end