From: Max on
Hi guys,
I'm relatively new to MATLAB and am having some trouble working out the best way to make a contour map.
Basically I have a set of x-y coordinates of points (around 300,000 of them) and I want to make a contour map of their concentration in the x-y plane. Ie. Closer contours in areas where there are a larger number of points.
Does anyone have any suggestions for how I might go about this?

Cheers!
From: Tom Lane on
> Basically I have a set of x-y coordinates of points (around 300,000 of
> them) and I want to make a contour map of their concentration in the x-y
> plane. Ie. Closer contours in areas where there are a larger number of
> points.

Max, try searching for "bivariate density" on the file exchange:

http://www.mathworks.com/matlabcentral/fileexchange/?term=bivariate+density

I haven't tried these, but the pictures for two of them look like what you
want, and they get good ratings.

If you have the Statistics Toolbox, the hist3 function doesn't do exactly
what you described, but you might want to have a look at it.

-- Tom