Function Repository Resource:

HertzsprungRussellDiagram

Source Notebook

Plot the positions of stars in a Hertzsprung–Russell diagram

Contributed by: Jeff Bryant

ResourceFunction["HertzsprungRussellDiagram"][]

plots the position of the Sun on a Hertzsprung–Russell diagram.

ResourceFunction["HertzsprungRussellDiagram"][entities]

plots the positions of the specified entities on a Hertzsprung–Russell diagram.

Details and Options

The Hertzsprung–Russell diagram is a plot showing the relationship between the stars’ absolute magnitudes or luminosities versus their effective temperatures.
Valid domains for entities or entity classes must be from the "Star" domain.
ResourceFunction["HertzsprungRussellDiagram"] supports the same options as ListPlot.

Examples

Basic Examples (4) 

Plot the position of the Sun on the Hertzsprung–Russell diagram:

In[1]:=
ResourceFunction["HertzsprungRussellDiagram"][]
Out[1]=

Plot the positions of other stars on the Hertzsprung–Russell diagram:

In[2]:=
ResourceFunction["HertzsprungRussellDiagram"][
 Entity["Star", "Alnitak"]]
Out[2]=

Plot multiple stars on the Hertzsprung–Russell diagram:

In[3]:=
ResourceFunction[
 "HertzsprungRussellDiagram"][{Entity["Star", "Sun"], Entity["Star", "Betelgeuse"], Entity["Star", "Alkaid"], Entity["Star", "ProximaCentauri"], Entity["Star", "SiriusB"], Entity["Star", "2MASSJ0523Minus1403"]}]
Out[3]=

Plot entity classes of stars on the Hertzsprung–Russell diagram:

In[4]:=
ResourceFunction["HertzsprungRussellDiagram"][
 EntityClass["Star", "WhiteDwarfStar"]]
Out[4]=

Options (1) 

HertzsprungRussellDiagram takes the same options as ListPlot, but the following options are of particular interest:

In[5]:=
ResourceFunction[
 "HertzsprungRussellDiagram"][{Entity["Star", "Zubenelgenubi"], Entity["Star", "Zubeneshamali"]}, PlotStyle -> Red]
Out[5]=
In[6]:=
ResourceFunction[
 "HertzsprungRussellDiagram"][{Entity["Star", "Zubenelgenubi"], Entity["Star", "Zubeneshamali"]}, PlotTheme -> "Detailed"]
Out[6]=

Version History

  • 2.1.0 – 02 June 2021
  • 2.0.0 – 09 March 2020
  • 1.0.0 – 19 June 2019

Related Resources

License Information