1

I have a XxYxZ array of data.

I generate a XxY scatter plot and then overlay them all for each Z.

But of course, this looks messy and all of the data points are on top of each other. I want to make a contour plot, showing probability density for the scattered data.

% A is a XxY matrix
for ii = length(A)
figure(1)
plot(A,squeeze(B(:,:,ii)),'o')
hold on
xlabel('A')
ylabel('B')
end

So how do I take the XxYxZ matrix B and XxY matrix A and plot the scatter plot of B and A at each Z onto a 2d probability density contour plot?

This is what I have... enter image description here

This is the kind of thing I'm going for....

figure

Alex
  • 39
  • 1
  • 3
  • 7

0 Answers0