The correct statement is:
The Hertzsprung-Russell diagram plots stars according to their luminosity and temperature, which is also associated with spectral class.
This accurately describes the purpose of the Hertzsprung-Russell diagram in comparing stars. Stars are plotted on the diagram based on their temperature (horizontal axis) and luminosity (vertical axis), allowing for analysis of their characteristics and classifications.