I would like to add hitogram for each scatter plot.
The code below plots in different color each slice of 3 dim scatter matrix.
I would like to replace 'scatter' with 'scatterhist' but the code does not work anymore.
n = [1:1:10]; % X
m = [1:1:3]; % Y
z1 = rand(1,20);z2 = rand(1,20);zr1 = reshape(z1,1,1,[]); % Z
zr2 = reshape(z2,1,1,[]); % ZF1 = meshgrid(n,m).*zr1; %XYZ
F2 = meshgrid(n,m).*zr2; %XYZC = jet(length(n))for en = 1:length(n) for pll = 1:length(m) scatter(reshape(F1(pll,en,:),1,[]),reshape(F2(pll,en,:),1,[]),[],C(en,:)); % ? scatterhist
hold on endendhold off
Best Answer