try
close(inst_plot);
catch
    fprintf('Already closed');
end

inst_plot=figure;
set(inst_plot,'name','MCat STATS');
t=get(Dhand.Time_Select,'value');
    switch t,
     case 1
        t=1;
      case 2
        t=3;
     case 3
        t=7;
     case 4
        t=100000; 
    end % switch
tind=find(Drift.microcat(1,:)>=now-t);
XLim=[(now-t) now];

R     = 4.2914;
depth = 1;
%s = salin_(Drift.microcat(3,tind)./R, Drift.microcat(2,tind), depth);%if you have real water in there

subplot(2,1,1)
plot(Drift.microcat(1,tind),Drift.microcat(2,tind),'b*');
datetick('x')
title(sprintf('%s Microcat Temperature',graphtitle));
ylabel('Temperature');
xlabel('Date');
subplot(2,1,2)
plot(Drift.microcat(1,tind),Drift.microcat(3,tind),'r*');
title(sprintf('%s Microcat Conductivity or PSU',graphtitle));
datetick('x');
ylabel('Conductivity');
xlabel('Date');