We study the size and spatial distribution of surface nanobubbles formed by the solvent exchange method to gain insight into the mechanism of their formation. The analysis of Atomic Force Microscopy (AFM) images of nanobubbles formed on a hydrophobic surface reveals that the nanobubbles are not randomly located, which we attribute to the role of the history of nucleation during the formation. Moreover, the size of each nanobubble is found to be strongly correlated with the area of the bubble-depleted zone around it. The precise correlation suggests that the nanobubbles grow by diffusion of the gas from the bulk rather than by diffusion of the gas adsorbed on the surface. Lastly, the size distribution of the nanobubbles is found to be well described by a log-normal distribution.