 %% Figure 9 Transect plot - time
figure (9);
hold on;
legendlabels=cell(1,length(trstdata_struct));
cmap=jet;
cmap_index=floor(linspace(1,size(cmap,1),length(trstdata_struct)));
cmap=cmap(cmap_index',:);
for i=1:length(trstdata_struct)
    lat=trstdata_struct(i).maindata(:,5);
    bio=trstdata_struct(i).maindata(:,9);
    time=trstdata_struct(i).maindata(:,1);
    %plot(lat, bio, 'LineWidth',2,'Color',cmap(i,:),'Marker','none');
    scatter(time,lat, 100, bio, 'filled');
    legendlabels{i}=['T',num2str(trstdata_struct(i).trstnum),', ',datestr(trstdata_struct(i).trsttime(1),'mm/dd HH:MM'),'-',datestr(trstdata_struct(i).trsttime(2),'mm/dd HH:MM')];
end

%xlimitlabel = [39.6 40.5];
%xlim(xlimitlabel);
%ylimitlabel = [-5 10];
%ylim(ylimitlabel);
%stn_name(stn_lat>xlimitlabel(2)|stn_lat<xlimitlabel(1),:)=[];
%stn_lat(stn_lat>xlimitlabel(2)|stn_lat<xlimitlabel(1))=[];
%set(gca,'XDir','reverse')
title('BioSat Main Line by Time', 'fontsize', 18, 'fontweight', 'bold');
xlabel('Time', 'fontsize', 14, 'fontweight', 'bold');
ylabel('Latitude', 'fontsize', 14, 'fontweight', 'bold');
grid on;
box on;
colorbar
colormap jet
caxis([-5 10])
datetick
ylim([39.6 40.5])
%set(gca, 'fontsize', 14);
%scatter(stn_lat,ylimitlabel(2)*ones(size(stn_lat)),50,'v','MarkerEdgeColor','k','LineWidth',2);
%text(stn_lat,(ylimitlabel(1)*0.1+ylimitlabel(2)*0.9)*ones(size(stn_lat)),stn_name);
%legend(legendlabels,'Location','NorthEastOutside','FontSize',10,'Box','off');  

    