Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The guy who made the original scatter plot is even a math teacher... yikes.

The post author provides some nice python code to create the plots, though the choice of hex bins when the original data was rounded to the nearest integer is a bit strange. Square bins set to some integer size would be better I believe.

If you're using Matlab, I've recently found cloudPlot (http://www.mathworks.com/matlabcentral/fileexchange/23238-cl...) to work rather nicely for "dense scatterplots".



Square bins set to some integer size would be better I believe.

I agree - a gaussian regularization would also work nicely. But matplotlib comes with a hexbin, so that's what I used.


Hexagons do have the benefit of being isotropic, however.


They have a higher order of symmetry than rectangles, but how are they isotropic?


I've probably remembered something wrong here, nevertheless the centres of all adjacent hexagons are of equal distance to the centre of the central hexagon. In contrast, a square sharing one vertex (diagonally adjacent) with the central square is farther than the square sharing one edge.


That's only if you use a scaling factor of 9 instead of 4.

edit: Wikipedia tells me hexagonal tiling is conjectured to be the tiling with the smallest perimeter per cell, and is the densest way to arrange circles on a plane. So that's a big plus when binning.


Click through gets you at http://mathworld.wolfram.com/HoneycombConjecture.html, which shows it is not a conjecture anymore. It was proven in 1999-2001 (I do not know whether the ArXiv version needed improvements)


See also http://www.mathworks.com/matlabcentral/fileexchange/19280-bi... amongst other density estimators, for a nice smooth plot of the estimated joint density.

(Downside being there's still a somewhat-arbitrary choice to be made for the smoothing bandwidth, and it's not quite as visually obvious as the choice of number of bins in a histogram plot.)


Somewhat arbitrary, but not completely. There's some heavy math that suggests sqrt(n) scaling in the 1-d case.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: