function hdl = plot_co2_data (hdl, st1, st2)

constants;
 
%{
% date limits
% change to adjust
%}

%% TICKS
x1 = datetime2datenum(dt1,'yyyy-mm-dd HH:MM:SS'); 
x2 = datetime2datenum(dt2,'yyyy-mm-dd HH:MM:SS');
% add datetime ticks
tick_inc = (x2-x1)/5; tick = x1:tick_inc:x2;

%% PLOT MOISTURE
% initialize figure. hdl is the handle to the plot object
figure(hdl);
subplot(3,1,2); set(gca,'box','off','fontsize',font_size); hold on;
% convert datetime to matlab's internal date format
dtnum = datetime2datenum (st1.dt, 'yyyy-mm-dd HH:MM:SS');
plot(dtnum, st1.ch1,'b'); plot(dtnum, st1.ch2,'r'); 
dtnum2 = datetime2datenum (st2.dt, 'yyyy-mm-dd HH:MM:SS');
plot(dtnum2, st2.ch1,'g');
xlim([x1 x2]); ylim(moistlim);
set(gca,'Xtick',tick); set(gca,'XtickLabel',datestr(tick,date_fig_fmt));


%% MOISTURE LABELS
ylabel('Soil Moisture [0-1]');
lgd=legend({'2 cm','8 cm','16 cm'}); set(lgd,'box','off');

%% PLOT TEMPERATURE
% initialize figure. hdl is the handle to the plot object
subplot(3,1,3); set(gca,'box','off','fontsize',font_size); hold on;
% convert datetime to matlab's internal date format
plot(dtnum, st1.ch3,'b'); plot(dtnum, st1.ch4,'r'); plot(dtnum2, st2.ch3,'g');
xlim([x1 x2]); ylim(templim);
set(gca,'Xtick',tick); set(gca,'XtickLabel',datestr(tick,date_fig_fmt));

%% TEMPERATURE LABELS
ylabel('Soil Temperature [celcius]');
lgd=legend({'2 cm','8 cm','16 cm'}); set(lgd,'box','off');

end