yieldplotlib.plots.yield_hist

yieldplotlib.plots.yield_hist#

Script to test AYO and EXOSIMS loading.

Functions#

plot_hist(temps, planet_bins, runs, run_labels[, ax, ...])

Plot a histogram of planet populations for different temperature bins.

autolabel(ax, rects[, use_cyberpunk])

Attach a text label above each bar displaying its height.

Module Contents#

yieldplotlib.plots.yield_hist.plot_hist(temps, planet_bins, runs, run_labels, ax=None, ax_kwargs=None, use_cyberpunk=False)[source]#

Plot a histogram of planet populations for different temperature bins.

Args:
temps (list):

List of temperature bins to plot, e.g., [“hot”, “warm”, “cold”].

planet_bins (list):

List of planet types to plot, e.g., [“Earth”, “Rocky”, “Super Earth”].

runs (list):

List of EXOSIMSDirectories and AYODirectories to plot.

run_labels (list):

List of labels for each run.

ax (matplotlib.axes.Axes, optional):

Axes to plot on. If None, a new figure is created.

ax_kwargs (dict, optional):

Keyword arguments to pass to ax.set().

use_cyberpunk (bool, optional):

Whether to use the mplcyberpunk style. Default is False.

Returns:
matplotlib.figure.Figure, matplotlib.axes.Axes:

Figure and axes objects for the plot.

yieldplotlib.plots.yield_hist.autolabel(ax, rects, use_cyberpunk=False)[source]#

Attach a text label above each bar displaying its height.