Exploring the Diversity of Known Exoplanets#

William Cerny, Imad Pasha, Yasmeen Asali, Sebastian Monzon (Yale University)

Description: Learn how to manipulate pandas dataframes to recreate a classic demographics plot of discovered exoplanets, their associated detection method, and characteristics with matplotlib.

Intended Audience: Early Undergraduate

tags: exoplanets, pandas, visualization

Requirements: matplotlib, numpy, pandas (requirements.txt)

Last Updated: August 21, 2025

Learning Objectives

  1. Download and open a csv file into a pandas dataframe.

  2. Set matplotlib axis based on pandas dataframe columns.

  3. Customize matplotlib plots to distinctly represent different types of data on one plot.

  4. Identify exoplanet detection methods and what types of planets the methods are biased towards.

  5. Recreate plots used in exoplanet literature.

Introduction#

When we detect exoplanets (planets orbiting other stars), we often obtain a subset of the following three direct observable properties:

  1. Their radius (formally, their radius relative to their host star’s radius),

  2. Their mass, and/or

  3. Their orbital separation (aka orbital radius for circular orbits, or semi-major axis for elliptical orbits).

The information available comes down to the detection methods used to find and characterize these systems.

  1. Transit Method: In this technique, exoplanets are detected by observing the periodic dimming of a star’s light as a planet passes in front of it (transits) from our line of sight. By measuring the decrease in brightness during transit events, astronomers can infer the presence and characteristics of orbiting planets. This method provides relative radius (from the depth of the dip) and orbital separation (inferred from the duration of an orbit, or time between transits).

  2. Radial Velocity Method: This method detects exoplanets by measuring the small periodic shifts in the star’s radial velocity caused by the gravitational pull of an orbiting planet. As the planet orbits the star, it causes the star to wobble slightly. This wobble can be detected through Doppler spectroscopy, and it provides an estimate of the mass (from Newton’s laws) and orbital separation (from the period of the wobbles) of the planet.

  3. Microlensing: Exoplanets can be detected through gravitational microlensing, where the gravitational field of a foreground star bends and magnifies the light of a background star as well as any orbiting planets. The presence of an exoplanet around the foreground star can be inferred from the temporary increase in brightness observed during the microlensing event.

  4. Direct Imaging: Exoplanets can be directly observed by observing the light of the planet itself – typically in the infrared (self-luminous, young planets), though surveys are increasingly moving toward the optical as well (probing reflected light from the host star). In direct imaging, the starlight is suppressed to capture light directly from the neighboring planet(s).

In addition to these four, there are a number of other methods of detecting planets (such as astrometry and pulsar timing)!

It is common to plot detected exoplanets in the space of mass vs. orbital separation. Here, we show one such plot, colored by the technique used to initially detect the planet (follow-up observations may have been needed to compute mass or separation).

The x-axis represents the planet-star separation, often expressed in astronomical units (AU), with 1 AU equivalent to the average distance between the Earth and the Sun (approximately 149.6 million kilometers). The y-axis of this figure, also on a log scale, shows the mass of the planet, reported in Jupiter masses (where 1 Jupiter mass equals approximately \(1.898 \times 10^{27}\) kg). Each data point plotted signifies an individual exoplanet.

The Mass-Separation Plot#

New planets are being discovered on a regular basis, and they continue to be added to the NASA Exoplanet Archive. In this exercise, we will recreate and update the above figure using this dataset.

Recreating Another Classic Plot: Period-Radius Diagram#

Another classic figure shows the period of detected exoplanets against planet radius. In this exercise, we will create that figure.