We determine the spatial distribution function of galaxies from a wide range of samples in the 2MASS survey . The results agree very well with the form of the distribution predicted by the theory of cosmological gravitational many-body galaxy clustering . On large scales we find a value of the clustering parameter b = 0.867 \pm 0.026 , in agreement with b = 0.83 \pm 0.05 found previously for the Pisces-Perseus supercluster . We measure b ( \theta ) as a function of scale , since this is a powerful test of the applicability of computer simulations . The results suggest that when galaxies clustered they were usually surrounded by individual , rather than by communal haloes .