The correct statement is:
The Hertzsprung-Russell diagram plots stars according to their luminosity and temperature, which is also associated with spectral class.
This statement accurately describes the primary function of the Hertzsprung-Russell diagram, which is a crucial tool in astronomy for understanding the relationships between different types of stars.