function r2=mycorrplot(X,labels_)

if any(size(X)==1)
    error('X must be n<n*m>m')
end
T=size(X,1);
N=size(X,2);
r2=zeros(N,N)*NaN;

nn=(N-1)*N/2;
rows=5;
cols=5;
cnt=1;
zz=1;

nf=ceil(nn/(rows*cols));
for jj=1:N
    for kk=1:N
        if jj<kk
            figure(zz);
            subplot(rows,cols,cnt)
            scatter(X(:,jj),X(:,kk));
            if nargin>1
                ylabel(labels_(jj,:))
                xlabel(labels_(kk,:))
            end
            cnt=cnt+1;
            if cnt>rows*cols
                cnt=1;
                zz=zz+1;
            end
            
            
        end
        res=myols(X(:,jj),X(:,kk),1,0);
        r2(jj,kk)=res.Rsq	;
        
        
    end
end