%
% This script plots a time series of environmental wind shear at the
% lcoation of the storm center, for an individual track. 
% Copyright 2009 WindRiskTech, L.L.C.
%--------------------------------------------------------------------------
params
if ~exist('templot.mat','file') || ~exist('nt','var')
    setplot;
end
load templot
clf
h=plot(daymod,wunitsfac*shear);
set(h,'linewidth',3)
set(gca,'fontname',gfont,'fontsize',gfontsize,'fontweight',gfontweight)
if monthm(1) ~= monthm (iq)
  jg=get(gca,'xticklabel');
  hj=str2num(char(jg)); %#ok<ST2NM>
  asiz=size(hj);
  asize=asiz(1,1);
  iswitch=0;
  for iss=1:asize
     if hj(iss) >daymax
        hj(iss)=hj(iss)-daymax;
     end
  end
  hjs=cellstr(num2str(hj));
  set(gca,'xticklabel',hjs);
  set(gca,'fontname',gfont,'fontsize',gfontsize,'fontweight',gfontweight)
end   
xlabel(ixlab,'fontweight','bold','fontsize',12)
ylabl=char(strcat('850 - 250 hPa shear (',wunitslabel,')'));
ylabel(ylabl,'fontweight','bold','fontsize',12)
title(tit1,'fontsize',12,'fontweight','bold','interpreter','none')
%
% Add button to access documentation of script
%
if strcmp(Docdisp,'y')
    try
        delete(hButton)
    catch
    end    
    tempname='trshear';
    mname = strcat('graphics_docs/html/',tempname,'_doc.html');
    comstr=['open ',mname,';delete(hButton)'];
    labelStr = '<html><center><a href="">Doc';
    hButton = uicontrol('string',labelStr,'pos',[10,10,50,20],'callback',comstr); 
end   