function [] = OLGA_plotting(t,y0,y,U,ControlStart)

%y= [w_Ga_in wmix_r_out alpha_lt p_ab p_at p_tt p_bh];
w_Ga_in=y(:,1);
wmix_r_out=y(:,2);
alpha_lt=y(:,3);
p_ab=y(:,4);
p_at=y(:,5);
p_tt=y(:,6);
p_bh=y(:,7);


% outputs=figure(224);
% clf
% set(gcf,'Color',[1,1,1])
% set(gca,'FontSize',15);
% plot(t/60,U);
% title('Production Choke','FontSize',16,'FontWeight','bold');
% xlabel('[Minutes]','FontSize',15)
% ylabel('[Percent]','FontSize',15)
% ylim([-0.1 1.1]);


%% Measurements and outputs

titleSize=20;
labelSize=18;
gcaSize=18;

outputs=figure(2);
clf
set(gcf,'Color',[1,1,1])
set(gca,'FontSize',gcaSize);

%subplot(4,2,1)
%plot(t/60,w_Ga_in,'k','linewidth',1);
%title('Injected gas into annulus [kg/s]','FontSize',16,'FontWeight','bold')
%xlabel('[minutes]','FontSize',15)
%ylabel('[kg/s]','FontSize',15)

subplot(4,2,1)
plot(t/60,p_at,'k','linewidth',1);
if (0)
    hold on;
    setpoint= linspace(1,1,length(t))*y0(5);
    plot(t/60,setpoint,'--b','linewidth',1);
    hold on;
    plot(ControlStart/60,setpoint(1) , 'rx','MarkerSize',15,'Linewidt',2);
    legend('measurement','setpoint','Control Start');
end
title('Pressure at Top of Annulus','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,2)
plot(t/60,p_tt,'k','linewidth',1);
title('Pressure at Top of Tubing','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,3)
plot(t/60,p_ab,'k','linewidth',1);
hold on;
%setpoint= linspace(1,1,length(t))*y0(4);
%plot(t/60,setpoint,'--b','linewidth',1);
title('Pressure at Bottom of Annulus','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,4)
plot(t/60,p_bh,'k','linewidth',1);
if (0)
    hold on;
    setpoint= linspace(1,1,length(t))*y0(7);
    plot(t/60,setpoint,'--b','linewidth',1);
    hold on;
    plot(ControlStart/60,setpoint(1) , 'rx','MarkerSize',15,'Linewidt',2);
    legend('measurement','setpoint','Control Start');
end
title('Pressure at Bottom Hole','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,5)
plot(t/60,wmix_r_out,'k','linewidth',1);
title('Mass Production Flow','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[Kg/s]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,6)
plot(t/60,wmix_r_out,'k','linewidth',1);
title('Mixture Density at Top of Tubing','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[kg/m^3]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,7)
plot(t/60,alpha_lt,'k','linewidth',1);
title('Liquid Volume Fraction at Top of Tubing','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[fraction]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(4,2,8)
plot(t/60,100*U,'k','linewidth',1);
hold on;
start=plot(ControlStart/60,100*U(1) , 'rx','MarkerSize',15,'Linewidt',2);
title('Production Choke Opening','FontSize',titleSize,'FontWeight','bold');
xlabel('[Minutes]','FontSize',labelSize)
ylabel('[Percent]','FontSize',labelSize)
legend(start,'Control Start');
ylim(100*[-0.1 1.1]);
set(gca,'FontSize',gcaSize);


%% Alternative Plot *** 
outputs=figure(6);
clf
set(gcf,'Color',[1,1,1])
set(gca,'FontSize',gcaSize);

subplot(3,2,1)
plot(t/60,p_at,'k','linewidth',1);
title('Pressure at Top of Annulus','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(3,2,2)
plot(t/60,p_tt,'k','linewidth',1);
title('Pressure at Top of Tubing','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(3,2,3)
plot(t/60,p_ab,'k','linewidth',1);
hold on;
%setpoint= linspace(1,1,length(t))*y0(4);
%plot(t/60,setpoint,'--b','linewidth',1);
title('Pressure at Bottom of Annulus','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(3,2,4)
plot(t/60,p_bh,'k','linewidth',1);
%hold on;
%setpoint= linspace(1,1,length(t))*y0;
%plot(t/60,setpoint,'--b','linewidth',1);
%hold on;
%plot(ControlStart/60,setpoint(1) , 'rx','MarkerSize',15,'Linewidt',2);
title('Pressure at Bottom Hole','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[bara]','FontSize',labelSize)
%legend('measurement','setpoint','Controll Start');
set(gca,'FontSize',gcaSize);

subplot(3,2,5)
plot(t/60,wmix_r_out,'k','linewidth',1);
title('Mass Production Flow','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[Kg/s]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);

subplot(3,2,6)
plot(t/60,alpha_lt,'k','linewidth',1);
title('Liquid Volume Fraction at Top of Tubing','FontSize',titleSize,'FontWeight','bold')
xlabel('[minutes]','FontSize',labelSize)
ylabel('[fraction]','FontSize',labelSize)
set(gca,'FontSize',gcaSize);






end

