%plot u 
set(0, 'defaulttextinterpreter','none')

colors = flipud(jet(20));

dd.x = data.dday;
dd.y = data.bins;
dd.z = dtfm.*(data.umeas + ones(config.nbins,1)*data.uship_g)

%set the stage
ddcfg = aplotit(dd);
clf

cfg = aplotit(dd,ddcfg,'cur_ax',subplot(411),'var_range',...
              [-8 8], 'comment', 'uship_g + umeas');
set(cfg.cur_ax,'ydir','reverse')

nbins = length(dd.y);
subplot(412)
plot([min(data.dday) max(data.dday)]',[0 0],'b');hold on
plot(data.dday,data.uship_g,'g','linewidth',2);hold on
for swathi = 1:length(colors(:,1))
   ii = (swathi - 1)*2 + [1:2];
   plot(data.dday, -data.umeas(ii,:), 'color',colors(swathi,:))
   hold on
end
xl(min(dd.x), max(dd.x))
yl(-8,8)
pos = get(gca,'pos');
boxpos = get(cfg.box_ax,'pos');
set(gca,'pos',[pos([1 2]), boxpos(3) pos(4)])


%now do v

dd.z =  dtfm.*(data.vmeas + ones(config.nbins,1)*data.vship_g);

cfg = aplotit(dd,ddcfg,'cur_ax',subplot(413),'var_range',...
              [-8 8], 'comment', 'vship_g + vmeas');
set(cfg.cur_ax,'ydir','reverse')

nbins = length(dd.y);
subplot(414)
plot([min(data.dday) max(data.dday)]',[0 0],'b');hold on
plot(data.dday,data.vship_g,'g','linewidth',2);hold on
for swathi = 1:length(colors(:,1))
   ii = (swathi - 1)*2 + [1:2];
   plot(data.dday, -data.vmeas(ii,:), 'color',colors(swathi,:))
   hold on
end
xl(min(dd.x), max(dd.x))
yl(-8,8)
pos = get(gca,'pos');
boxpos = get(cfg.box_ax,'pos');
set(gca,'pos',[pos([1 2]), boxpos(3) pos(4)])

