function []=hidensitymatrix(data)
figure;
s=size(data,2);
i=0;
for n=1:s
    for m=1:s
        i=i+1;
        if m>n
        subplot(n,m,i), density2(data(:,[n m]));
        end
    end
end
end
function [N,C]=density2(data_2d_columnar)
D=data_2d_columnar;
[N,C]=hist3(D,[100 100]);
N(N==0)=NaN;
%N=log10(N);
contourf(C{1},C{2},N,7);
xlim([-inf inf]);
ylim([-inf inf]);
n=1;
if n>0;
h.Colormap(n,:)=0.9.*ones(n,3);
end
%shading interp
box off
end