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

inst_plot=figure;
set(inst_plot,'name','OASIS 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.oasis(1,:)>=now-t);
subplot(2,2,1);
plot(Drift.oasis(1,tind),Drift.oasis(2,tind),'b-');
datetick('x');
xlabel('Time','FontWeight','Bold');
ylabel('Celsius','FontWeight','Bold');
titl=sprintf('%s Can Temp',graphtitle);
title(titl,'FontWeight','Bold');
subplot(2,2,2);
plot(Drift.oasis(1,tind),Drift.oasis(3,tind),'r-');
datetick('x');
xlabel('Time','FontWeight','Bold');
ylabel('Volts','FontWeight','Bold');
titl=sprintf('%s Can Voltage',graphtitle);
title(titl,'FontWeight','Bold');
subplot(2,2,3);
plot(Drift.oasis(1,tind),Drift.oasis(4,tind),'g-');
datetick('x');
xlabel('Time','FontWeight','Bold');
ylabel('Amps','FontWeight','Bold');
titl=sprintf('%s Can Current',graphtitle);
title(titl,'FontWeight','Bold');
subplot(2,2,4);
plot(Drift.oasis(1,tind),Drift.oasis(5,tind),'m-');
datetick('x');
xlabel('Time','FontWeight','Bold');
ylabel('PSI','FontWeight','Bold');
titl=sprintf('%s Can Pressure',graphtitle);
title(titl,'FontWeight','Bold');


