No, planets within a galaxy are not aligned in a single line through their centers. In a galaxy, such as our Milky Way, planets orbit around individual stars, and these stars are distributed throughout the galaxy in various locations. Planetary systems, like our own solar system, typically have multiple planets in orbits that are not aligned in a straight line. Each planet has its own orbit and position relative to its star.
Similarly, when we consider other galaxies beyond our own, the distribution of stars, planetary systems, and other celestial objects is not confined to a single line. Galaxies are vast collections of stars, gas, and dust, and they come in different shapes and sizes. The arrangement and distribution of objects within a galaxy can be complex and varied, with stars and planetary systems occupying various positions within the galaxy's structure.
On a larger scale, when we look at the universe as a whole, we observe a vast network of galaxies, each with its own distinct position and orientation. These galaxies are distributed throughout the universe in a web-like pattern, forming clusters, filaments, and voids. The large-scale structure of the universe is not confined to a single line or alignment, but rather exhibits a rich and intricate spatial distribution.
So, to summarize, planets within a galaxy, as well as galaxies themselves, are not arranged in a single line through their centers. Instead, they occupy various positions and orientations within their respective systems and structures in the universe.