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 a stars' absolute magnitude or luminosity and its effective temperature.
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", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][]
Out[2]=

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

In[3]:=
ResourceFunction[
 "HertzsprungRussellDiagram", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Entity["Star", "Alnitak"]]

Plot multiple stars on the Hertzsprung–Russell diagram:

In[4]:=
ResourceFunction[
 "HertzsprungRussellDiagram", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{Entity["Star", "Sun"], Entity["Star", "Betelgeuse"], Entity["Star", "Alkaid"], Entity["Star", "ProximaCentauri"], Entity["Star", "SiriusB"], Entity["Star", "2MASSJ0523Minus1403"]}]

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

In[5]:=
ResourceFunction[
 "HertzsprungRussellDiagram", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][EntityClass["Star", "WhiteDwarfStar"]]
Out[6]=

Options (1) 

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

In[7]:=
ResourceFunction[
 "HertzsprungRussellDiagram", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{Entity["Star", "Zubenelgenubi"], Entity["Star", "Zubeneshamali"]}, PlotStyle -> Red]
Out[8]=
In[9]:=
ResourceFunction[
 "HertzsprungRussellDiagram", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][{Entity["Star", "Zubenelgenubi"], Entity["Star", "Zubeneshamali"]}, PlotTheme -> "Detailed"]
Out[10]=

Version History

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

Related Resources

License Information