function updateaxislabel(xsel,diagonalline,sequence,Offset)
yticknum = find(xsel>0);

% set(gca,'ytick',xsel(yticknum),'yticklabel',yticknum,...
%     'xtick',diagonalline(round(xsel(yticknum))),'xticklabel',yticknum,'fontweight','bold');
letters = sequence(yticknum-Offset);

if length(yticknum)>1
    if xsel(yticknum(1))<xsel(yticknum(2))
        set(gca,'ytick',xsel(yticknum),'yticklabel',[letters; num2str(yticknum')']',...
            'fontweight','bold','xtick',diagonalline(round(xsel(yticknum))),'xticklabel',[],'fontsize',10);
    else
        yticknum = yticknum( length(yticknum):-1:1);
        set(gca,'ytick',xsel(yticknum),'yticklabel',[letters; num2str(yticknum')']',...
            'fontweight','bold','xtick',diagonalline(round(xsel(yticknum))),'xticklabel',[],'fontsize',10);
    end
end
axis on


