function bcpairs(F,Z,ind) % Pairwise scatterplots of arrays on Factors in F % Columns are arrays, rows are factors % with numbers and coloured according to one of two groups in indicator Z % which can be 0,1 or something else (=unclassified) % clf; fsize=12; set(gca,'FontSize',fsize); [p n]=size(F); nn=1:n; n0=nn(Z==0); n1=nn(Z==1); n2=nn(~(Z==1|Z==0)); n=length(ind); a=min(F(ind,:)'); b=max(F(ind,:)'); del=(b-a)/8; a=a-del; b=b+del; pic=1; for i=1:(n-1) for j=(i+1):n subplot(n-1,n-1,pic) set(gca,'fontsize',12) axis([a(j) b(j) a(i) b(i)]); hold on; plot([a(j) b(j)],[0 0],'k:'); plot([0 0],[a(i) b(i)],'k:'); xlabel(['Metagene ',int2str(ind(j))]); ylabel(['Metagene ',int2str(ind(i))]); for h=n1 text(F(ind(j),h),F(ind(i),h),int2str(h),'Color','r','HorizontalAlignment','Center','fontsize',11) end; for h=n0 text(F(ind(j),h),F(ind(i),h),int2str(h),'Color','b','HorizontalAlignment','Center','fontsize',11) end; for h=n2 text(F(ind(j),h),F(ind(i),h),int2str(h),'Color','k','HorizontalAlignment','Center','fontsize',11) end; hold off; pic=pic+1; end; pic=pic+i; end; hold off; %