function drawpairscan(Fpr, Fnt, chrid, chroms, header) %draw a pairscan figure %figure Z = Fpr + Fnt'; m = size(Z,1); surf([[Z,zeros(m,1)];zeros(1,m+1)]) %shading flat colormap(jet) axis([1,m+1,1,m+1]) %caxis([0,6.25]) view(2) axis square h1 = colorbar for i = chroms x = find(chrid == i); polyx = [min(x); min(x); max(x)+1; max(x)+1]; polyy = [min(x); max(x)+1; max(x)+1; min(x)]; patch(polyx,polyy,30*ones(4,1), 'w') end mp = zeros(1,max(chrid)); dx = 1; for i = chroms mp(dx) = mean(find(chrid==i)); dx = dx + 1; end set(gca,'Ticklength',[0 0]) set(gca,'XTickLabel',[]) set(gca,'YTickLabel',[]) label = [num2str(chroms')]; for i = 1:length(chroms) h = text(mp(i)+0.5, mp(i)+0.5, 32, label(i,:)); set(h,'FontSize',6,'VerticalAlignment','Middle','HorizontalAlignment','Center') end title(header)