This diagram shows the distribution of galaxies with their distance and visual brightness. Which galaxy type it is, refer to the legend.
The galaxies with less than 5 million ly away part of our local group. Most of them are either satellite galaxies of the Milky Way (eg large Magellanic Cloud, about 150,000 ly) or the Andromeda galaxy (eg, M 110 and M 32 at 2.2 - 2.3 million ly).