plot_catalogs.py

setup_fig_single(fig_size, left, bottom, right, top)

Set up a single-panel figure using matplotlib.gridspec.GridSpec.

Parameters:
  • fig_size (tuple) – The figure size, e.g. (16,8).

  • left (float) – The left margin of the panel (between 0 and 1).

  • bottom (float) – The bottom margin of the panel (between 0 and 1).

  • right (float) – The right margin of the panel (between 0 and 1).

  • top (float) – The top margin of the panel (between 0 and 1).

Returns:

ax – The plotting axes for the figure.

Return type:

matplotlib.axes._subplots.AxesSubplot

plot_panel_counts_hist_simple(ax, x_sim, x_Kep, x_min=0, x_max=None, y_min=None, y_max=None, x_llim=None, x_ulim=None, normalize=False, N_sim_Kep_factor=1.0, log_y=False, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ms_Kep=['x'], lines_Kep=False, lw=1, labels_sim=['Simulated'], labels_Kep=['Kepler'], xticks_custom=None, xlabel_text='x', ylabel_text='Number', afs=20, tfs=20, lfs=16, legend=False, show_counts_sim=False, show_counts_Kep=False)

Plot histogram(s) of discrete integer values on a given panel.

Parameters:
  • ax (matplotlib.axes._subplots.AxesSubplot) – The axes to plot on.

  • x_sim (list[array[int]]) – A list with sample(s) of integers (e.g. simulated data).

  • x_Kep (list[array[int]]) – A list with sample(s) of integers (e.g. Kepler data).

  • x_min (float, default=0) – The minimum value to include.

  • x_max (float, optional) – The maximum value to include.

  • y_min (float, optional) – The lower y-axis limit.

  • y_max (float, optional) – The upper y-axis limit.

  • x_llim (float, optional) – The lower x-axis limit.

  • x_ulim (float, optional) – The upper x-axis limit.

  • normalize (bool, default=False) – Whether to normalize the histograms. If True, each histogram will sum to one.

  • N_sim_Kep_factor (float, default=1.) – The number of simulated targets divided by the number of Kepler targets. If normalize=False, will divide the bin counts for the simulated data (x_sim) by this value to provide an equivalent comparison to the Kepler counts.

  • log_y (bool, default=False) – Whether to plot the y-axis on a log-scale.

  • c_sim (list[str], default=['k']) – A list of plotting colors for the histograms of simulated data.

  • c_Kep (list[str], default=['k']) – A list of plotting colors for the histograms of Kepler data.

  • ls_sim (list[str], default=['-']) – A list of line styles for the histograms of simulated data.

  • ms_Kep (list[str], default=['x']) – A list of marker shapes for the histograms of Kepler data.

  • lines_Kep (bool, default=False) – Whether to also draw the histogram lines for the Kepler data. Default value (False) will just draw marker points (given by ms_Kep) for the Kepler counts in each bin.

  • lw (float, default=1) – The line width for the histograms.

  • labels_sim (list[str], default=['Simulated']) – A list of legend labels for the histograms of simulated data.

  • labels_Kep (list[str], default=['Kepler']) – A list of legend labels for the histograms of Kepler data.

  • xticks_custom (list or array[float], optional) – The x-values at which to plot ticks.

  • xlabel_text (str, default='x') – The x-axis label.

  • ylabel_text (str, default='Number') – The y-axis label.

  • afs (int, default=20) – The axes fontsize.

  • tfs (int, default=20) – The text fontsize.

  • lfs (int, default=16) – The legend fontsize.

  • legend (bool, default=False) – Whether to show the legend.

  • show_counts_sim (bool, default=False) – Whether to show the individual bin counts for the simulated data.

  • show_counts_Kep (bool, default=True) – Whether to show the individual bin counts for the Kepler data.

plot_fig_counts_hist_simple(x_sim, x_Kep, x_min=0, x_max=None, y_min=None, y_max=None, x_llim=None, x_ulim=None, normalize=False, N_sim_Kep_factor=1.0, log_y=False, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ms_Kep=['x'], lines_Kep=False, lw=1, labels_sim=['Simulated'], labels_Kep=['Kepler'], xticks_custom=None, xlabel_text='x', ylabel_text='Number', afs=20, tfs=20, lfs=16, legend=False, show_counts_sim=False, show_counts_Kep=False, fig_size=(8, 4), fig_lbrt=[0.15, 0.2, 0.95, 0.925], save_name='no_name_fig.pdf', save_fig=False)

Plot a figure with histogram(s) of discrete integer values.

Wrapper for the function syssimpyplots.plot_catalogs.plot_panel_counts_hist_simple(). Includes all of the parameters of that function, with the following additional parameters:

Parameters:
  • fig_size (tuple, default=(8,4)) – The figure size (width, height).

  • fig_lbrt (list[float], default=[0.15, 0.2, 0.95, 0.925]) – The positions of the (left, bottom, right, and top) margins of the plotting panel (all values must be between 0 and 1).

  • save_name (str, default='no_name_fig.pdf') – The file name for saving the figure.

  • save_fig (bool, default=False) – Whether to save the figure. If True, will save the figure in the working directory with the file name given by save_name.

Returns:

ax – The plotting axes, if save_fig=False.

Return type:

matplotlib.axes._subplots.AxesSubplot

plot_panel_pdf_simple(ax, x_sim, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=None, n_bins=100, normalize=True, N_sim_Kep_factor=1.0, log_x=False, log_y=False, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ls_Kep=['-'], lw=1, alpha=0.2, labels_sim=['Simulated'], labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='Fraction', afs=20, tfs=20, lfs=16, legend=False)

Plot histogram(s) of continuous distributions on a given panel.

Parameters:
  • ax (matplotlib.axes._subplots.AxesSubplot) – The axes to plot on.

  • x_sim (list[array[float]]) – A list with sample(s) of values (e.g. simulated data).

  • x_Kep (list[array[float]]) – A list with sample(s) of values (e.g. Kepler data).

  • x_min (float, optional) – The minimum value to include.

  • x_max (float, optional) – The maximum value to include.

  • y_min (float, default=0.) – The lower y-axis limit.

  • y_max (float, optional) – The upper y-axis limit.

  • n_bins (int, default=100) – The number of bins.

  • normalize (bool, default=True) – Whether to normalize the histograms. If True, each histogram will sum to one.

  • N_sim_Kep_factor (float, default=1.) – The number of simulated targets divided by the number of Kepler targets. If normalize=False, will divide the bin counts for the simulated data (x_sim) by this value to provide an equivalent comparison to the Kepler counts.

  • log_x (bool, default=False) – Whether to plot the x-axis on a log-scale and use log-uniform bins.

  • log_y (bool, default=False) – Whether to plot the y-axis on a log-scale.

  • c_sim (list[str], default=['k']) – A list of plotting colors for the histograms of simulated data.

  • c_Kep (list[str], default=['k']) – A list of plotting colors for the histograms of Kepler data.

  • ls_sim (list[str], default=['-']) – A list of line styles for the histograms of simulated data.

  • ls_Kep (list[str], default=['-']) – A list of line styles for the histograms of Kepler data.

  • lw (float, default=1) – The line width for the histograms.

  • alpha (float, default=0.2) – The transparency of the shading for the histograms of Kepler data (between 0 and 1).

  • labels_sim (list[str], default=['Simulated']) – A list of legend labels for the histograms of simulated data.

  • labels_Kep (list[str], default=['Kepler']) – A list of legend labels for the histograms of Kepler data.

  • extra_text (str, optional) – Extra text to be displayed on the figure.

  • xticks_custom (list or array[float], optional) – The x-values at which to plot ticks.

  • xlabel_text (str, default='x') – The x-axis label.

  • ylabel_text (str, default='Fraction') – The y-axis label.

  • afs (int, default=20) – The axes fontsize.

  • tfs (int, default=20) – The text fontsize.

  • lfs (int, default=16) – The legend fontsize.

  • legend (bool, default=False) – Whether to show the legend.

plot_fig_pdf_simple(x_sim, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=None, n_bins=100, normalize=True, N_sim_Kep_factor=1.0, log_x=False, log_y=False, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ls_Kep=['-'], lw=1, alpha=0.2, labels_sim=['Simulated'], labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='Fraction', afs=20, tfs=20, lfs=16, legend=False, fig_size=(8, 4), fig_lbrt=[0.15, 0.2, 0.95, 0.925], save_name='no_name_fig.pdf', save_fig=False)

Plot a figure with histogram(s) of continuous distributions.

Wrapper for the function syssimpyplots.plot_catalogs.plot_panel_pdf_simple(). Includes all of the parameters of that function, with the following additional parameters:

Parameters:
  • fig_size (tuple, default=(8,4)) – The figure size (width, height).

  • fig_lbrt (list[float], default=[0.15, 0.2, 0.95, 0.925]) – The positions of the (left, bottom, right, and top) margins of the plotting panel (all values must be between 0 and 1).

  • save_name (str, default='no_name_fig.pdf') – The file name for saving the figure.

  • save_fig (bool, default=False) – Whether to save the figure. If True, will save the figure in the working directory with the file name given by save_name.

Returns:

ax – The plotting axes, if save_fig=False.

Return type:

matplotlib.axes._subplots.AxesSubplot

plot_panel_pdf_credible(ax, x_sim1, x_sim2, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=None, n_bins=100, step='mid', qtls=[0.16, 0.5, 0.84], plot_median=False, normalize=True, N_sim_Kep_factor=1.0, log_x=False, log_y=False, c_sim1='k', c_sim2='g', c_Kep=['k'], ls_sim1='--', ls_sim2='--', ls_Kep=['-'], lw=1, alpha=0.2, label_sim1='Simulated 1', label_sim2='Simulated 2', labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='Fraction', afs=20, tfs=20, lfs=16, legend=False)

Plot credible regions for the histograms of continuous distributions on a given panel.

Parameters:
  • ax (matplotlib.axes._subplots.AxesSubplot) – The axes to plot on.

  • x_sim1 (list[array[float]]) – The lists with sample(s) of values (e.g. simulated data). Each list should contain enough samples (e.g. ~100) to compute reliable credible regions.

  • x_sim2 (list[array[float]]) – The lists with sample(s) of values (e.g. simulated data). Each list should contain enough samples (e.g. ~100) to compute reliable credible regions.

  • x_Kep (list[array[float]]) – A list with sample(s) of values (e.g. Kepler data). Each sample in this list will be plotted as a histogram.

  • x_min (float, optional) – The minimum value to include. All histograms will share this value for the minimum bin edge.

  • x_max (float, optional) – The maximum value to include. All histograms will share this value for the maximum bin edge.

  • y_min (float, default=0.) – The lower y-axis limit.

  • y_max (float, optional) – The upper y-axis limit.

  • n_bins (int, default=100) – The number of bins.

  • step ({'mid', 'pre', 'post', None}) – The position to draw the steps for the credible regions of the histograms. Default is ‘mid’, but can also be set to ‘None’ if want to draw smooth curves.

  • qtls (list[float], default=[0.16,0.5,0.84]) – The quantiles for the credible regions of the histograms in x_sim1 and x_sim2.

  • plot_median (bool, default=False) – Whether to plot the medians of the histograms in x_sim1 and x_sim2.

  • normalize (bool, default=True) – Whether to normalize the histograms. If True, each histogram will sum to one.

  • N_sim_Kep_factor (float, default=1.) – The number of simulated targets divided by the number of Kepler targets. If normalize=False, will divide the bin counts for each sample in x_sim1 and x_sim2 by this value to provide an equivalent comparison to the Kepler counts.

  • log_x (bool, default=False) – Whether to plot the x-axis on a log-scale and use log-uniform bins.

  • log_y (bool, default=False) – Whether to plot the y-axis on a log-scale.

  • c_sim1 (str, default='k') – The plotting colors for the credible region of each set of x_sim1 and x_sim2.

  • c_sim2 (str, default='k') – The plotting colors for the credible region of each set of x_sim1 and x_sim2.

  • c_Kep (list[str], default=['k']) – A list of plotting colors for the histograms of each sample in x_Kep1.

  • ls_sim1 (str, default='-') – The line styles for the median histograms of each set of x_sim1 and x_sim2.

  • ls_sim2 (str, default='-') – The line styles for the median histograms of each set of x_sim1 and x_sim2.

  • ls_Kep (list[str], default=['-']) – A list of line styles for the histograms of each sample in x_Kep1.

  • lw (float, default=1) – The line width for the histograms.

  • alpha (float, default=0.2) – The transparency of the shading for the histograms of Kepler data (between 0 and 1).

  • label_sim1 (str, default='Simulated 1','Simulated 2') – The legend labels for the credible regions of each set of x_sim1 and x_sim2.

  • label_sim2 (str, default='Simulated 1','Simulated 2') – The legend labels for the credible regions of each set of x_sim1 and x_sim2.

  • labels_Kep (list[str], default=['Kepler']) – A list of legend labels for the histograms of each sample in x_Kep1.

  • extra_text (str, optional) – Extra text to be displayed on the figure.

  • xticks_custom (list or array[float], optional) – The x-values at which to plot ticks.

  • xlabel_text (str, default='x') – The x-axis label.

  • ylabel_text (str, default='Fraction') – The y-axis label.

  • afs (int, default=20) – The axes fontsize.

  • tfs (int, default=20) – The text fontsize.

  • lfs (int, default=16) – The legend fontsize.

  • legend (bool, default=False) – Whether to show the legend.

plot_fig_pdf_credible(x_sim1, x_sim2, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=None, n_bins=100, step='mid', qtls=[0.16, 0.5, 0.84], plot_median=False, normalize=True, N_sim_Kep_factor=1.0, log_x=False, log_y=False, c_sim1='k', c_sim2='g', c_Kep=['k'], ls_sim1='--', ls_sim2='--', ls_Kep=['-'], lw=1, alpha=0.2, label_sim1='Simulated 1', label_sim2='Simulated 2', labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='Fraction', afs=20, tfs=20, lfs=16, legend=False, fig_size=(8, 4), fig_lbrt=[0.15, 0.2, 0.95, 0.925], save_name='no_name_fig.pdf', save_fig=False)

Plot a figure with credible regions of the histograms of continuous distributions.

Wrapper for the function syssimpyplots.plot_catalogs.plot_panel_pdf_credible(). Includes all of the parameters of that function, with the following additional parameters:

Parameters:
  • fig_size (tuple, default=(8,4)) – The figure size (width, height).

  • fig_lbrt (list[float], default=[0.15, 0.2, 0.95, 0.925]) – The positions of the (left, bottom, right, and top) margins of the plotting panel (all values must be between 0 and 1).

  • save_name (str, default='no_name_fig.pdf') – The file name for saving the figure.

  • save_fig (bool, default=False) – Whether to save the figure. If True, will save the figure in the working directory with the file name given by save_name.

Returns:

ax – The plotting axes, if save_fig=False.

Return type:

matplotlib.axes._subplots.AxesSubplot

plot_panel_cdf_simple(ax, x_sim, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=1.0, log_x=False, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ls_Kep=['--'], lw=1, labels_sim=['Simulated'], labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='CDF', one_minus=False, afs=20, tfs=20, lfs=16, legend=False, label_dist=False)

Plot cumulative distribution functions (CDFs) for continuous distributions on a given panel.

Parameters:
  • ax (matplotlib.axes._subplots.AxesSubplot) – The axes to plot on.

  • x_sim (list[array[float]]) – A list with sample(s) of values (e.g. simulated data).

  • x_Kep (list[array[float]]) – A list with sample(s) of values (e.g. Kepler data).

  • x_min (float, optional) – The lower x-axis limit.

  • x_max (float, optional) – The upper x-axis limit.

  • y_min (float, default=0.) – The lower y-axis limit.

  • y_max (float, default=1.) – The upper y-axis limit.

  • log_x (bool, default=False) – Whether to plot the x-axis on a log-scale.

  • c_sim (list[str], default=['k']) – A list of plotting colors for the CDFs of simulated data.

  • c_Kep (list[str], default=['k']) – A list of plotting colors for the CDFs of Kepler data.

  • ls_sim (list[str], default=['-']) – A list of line styles for the CDFs of simulated data.

  • ls_Kep (list[str], default=['--']) – A list of line styles for the CDFs of Kepler data.

  • lw (float, default=1) – The line width for the CDFs.

  • labels_sim (list[str], default=['Simulated']) – A list of legend labels for the CDFs of simulated data.

  • labels_Kep (list[str], default=['Kepler']) – A list of legend labels for the CDFs of Kepler data.

  • extra_text (str, optional) – Extra text to be displayed on the figure.

  • xticks_custom (list or array[float], optional) – The x-values at which to plot ticks.

  • xlabel_text (str, default='x') – The x-axis label.

  • ylabel_text (str, default='CDF') – The y-axis label.

  • one_minus (bool, default=False) – Whether to plot one minus the CDF.

  • afs (int, default=20) – The axes fontsize.

  • tfs (int, default=20) – The text fontsize.

  • lfs (int, default=16) – The legend fontsize.

  • legend (bool, default=False) – Whether to show the legend.

  • label_dist (bool, default=False) – Whether to compute and show the distances between the simulated and Kepler CDFs on the lower-right corner of the plot. If True, will compute the KS distance (using syssimpyplots.compare_kepler.KS_dist()) and the modified AD distance (using syssimpyplots.compare_kepler.AD_mod_dist()) between each pair of x_sim and x_Kep arrays.

plot_fig_cdf_simple(x_sim, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=1.0, log_x=False, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ls_Kep=['--'], lw=1, labels_sim=['Simulated'], labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='CDF', one_minus=False, afs=20, tfs=20, lfs=16, legend=False, label_dist=False, fig_size=(8, 4), fig_lbrt=[0.15, 0.2, 0.95, 0.925], save_name='no_name_fig.pdf', save_fig=False)

Plot a figure with CDF(s) of continuous distributions.

Wrapper for the function syssimpyplots.plot_catalogs.plot_panel_cdf_simple(). Includes all of the parameters of that function, with the following additional parameters:

Parameters:
  • fig_size (tuple, default=(8,4)) – The figure size (width, height).

  • fig_lbrt (list[float], default=[0.15, 0.2, 0.95, 0.925]) – The positions of the (left, bottom, right, and top) margins of the plotting panel (all values must be between 0 and 1).

  • save_name (str, default='no_name_fig.pdf') – The file name for saving the figure.

  • save_fig (bool, default=False) – Whether to save the figure. If True, will save the figure in the working directory with the file name given by save_name.

Returns:

ax – The plotting axes, if save_fig=False.

Return type:

matplotlib.axes._subplots.AxesSubplot

plot_panel_cdf_credible(ax, x_sim1, x_sim2, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=1.0, log_x=False, eval_cdf_all_points=False, n_bins_cdf=100, qtls=[0.16, 0.5, 0.84], plot_median=False, c_sim1='k', c_sim2='g', c_Kep=['k'], ls_sim1='--', ls_sim2='--', ls_Kep=['-'], lw=1, alpha=0.2, label_sim1='Simulated 1', label_sim2='Simulated 2', labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='CDF', one_minus=False, afs=20, tfs=20, lfs=16, legend=False)

Compute and plot the credible region of multiple cumulative distribution functions (CDFs) for continuous distributions on a given panel.

Parameters:
  • ax (matplotlib.axes._subplots.AxesSubplot) – The axes to plot on.

  • x_sim1 (list[array[float]]) – The lists with sample(s) of values (e.g. simulated data). Each list should contain enough samples (e.g. ~100) to compute reliable credible regions.

  • x_sim2 (list[array[float]]) – The lists with sample(s) of values (e.g. simulated data). Each list should contain enough samples (e.g. ~100) to compute reliable credible regions.

  • x_Kep (list[array[float]]) – A list with sample(s) of values (e.g. Kepler data). Each sample in this list will be plotted as a CDF.

  • x_min (float, optional) – The lower x-axis limit.

  • x_max (float, optional) – The upper x-axis limit.

  • y_min (float, default=0.) – The lower y-axis limit.

  • y_max (float, default=1.) – The upper y-axis limit.

  • log_x (bool, default=False) – Whether to plot the x-axis on a log-scale.

  • eval_cdf_all_points (bool, default=False) – Whether to evaluate the credible region of the CDFs at all points. If False, will just evaluate the credible region at a number of points (n_bins_cdf) on a linear/log-linear (for log_x = False/True) scale. WARNING: if True, will take a long time if there are many points in each sample (and this is likely overkill). The recommended option is to keep this False.

  • n_bins_cdf (int, default=100) – The number of points to evaluate the credible region of the CDFs at, if eval_cdf_all_points=False.

  • qtls (list[float], default=[0.16,0.5,0.84]) – The quantiles for the credible regions of the CDFs in x_sim1 and x_sim2.

  • plot_median (bool, default=False) – Whether to plot the medians of the CDFs in x_sim1 and x_sim2.

  • c_sim1 (str, default='k') – The plotting colors for the credible region of each set of x_sim1 and x_sim2.

  • c_sim2 (str, default='k') – The plotting colors for the credible region of each set of x_sim1 and x_sim2.

  • c_Kep (list[str], default=['k']) – A list of plotting colors for the CDFs of each sample in x_Kep.

  • ls_sim1 (str, default='-') – The line styles for the median CDFs of each set of x_sim1 and x_sim2.

  • ls_sim2 (str, default='-') – The line styles for the median CDFs of each set of x_sim1 and x_sim2.

  • ls_Kep (list[str], default=['--']) – A list of line styles for the CDFs of each sample in x_Kep.

  • lw (float, default=1) – The line width for the CDFs of each sample in x_Kep.

  • alpha (float, default=0.2) – The transparency of the shading for the credible regions of the CDFs.

  • label_sim1 (str, default='Simulated 1','Simulated 2') – The legend labels for the credible regions of each set of x_sim1 and x_sim2.

  • label_sim2 (str, default='Simulated 1','Simulated 2') – The legend labels for the credible regions of each set of x_sim1 and x_sim2.

  • labels_Kep (list[str], default=['Kepler']) – A list of legend labels for the CDFs of each sample in x_Kep.

  • extra_text (str, optional) – Extra text to be displayed on the figure.

  • xticks_custom (list or array[float], optional) – The x-values at which to plot ticks.

  • xlabel_text (str, default='x') – The x-axis label.

  • ylabel_text (str, default='CDF') – The y-axis label.

  • one_minus (bool, default=False) – Whether to plot one minus the CDF.

  • afs (int, default=20) – The axes fontsize.

  • tfs (int, default=20) – The text fontsize.

  • lfs (int, default=16) – The legend fontsize.

  • legend (bool, default=False) – Whether to show the legend.

plot_fig_cdf_credible(x_sim1, x_sim2, x_Kep, x_min=None, x_max=None, y_min=0.0, y_max=1.0, log_x=False, eval_cdf_all_points=False, n_bins_cdf=100, qtls=[0.16, 0.5, 0.84], plot_median=False, c_sim1='k', c_sim2='g', c_Kep=['k'], ls_sim1='--', ls_sim2='--', ls_Kep=['-'], lw=1, alpha=0.2, label_sim1='Simulated 1', label_sim2='Simulated 2', labels_Kep=['Kepler'], extra_text=None, xticks_custom=None, xlabel_text='x', ylabel_text='CDF', one_minus=False, afs=20, tfs=20, lfs=16, legend=False, fig_size=(8, 4), fig_lbrt=[0.15, 0.2, 0.95, 0.925], save_name='no_name_fig.pdf', save_fig=False)

Plot a figure with credible regions of the CDFs of continuous distributions.

Wrapper for the function syssimpyplots.plot_catalogs.plot_panel_cdf_credible(). Includes all of the parameters of that function, with the following additional parameters:

Parameters:
  • fig_size (tuple, default=(8,4)) – The figure size (width, height).

  • fig_lbrt (list[float], default=[0.15, 0.2, 0.95, 0.925]) – The positions of the (left, bottom, right, and top) margins of the plotting panel (all values must be between 0 and 1).

  • save_name (str, default='no_name_fig.pdf') – The file name for saving the figure.

  • save_fig (bool, default=False) – Whether to save the figure. If True, will save the figure in the working directory with the file name given by save_name.

Returns:

ax – The plotting axes, if save_fig=False.

Return type:

matplotlib.axes._subplots.AxesSubplot

plot_fig_mult_cdf_simple(x_sim, x_Kep, x_min=1, x_max=None, y_min=0.0, y_max=1.0, c_sim=['k'], c_Kep=['k'], ls_sim=['-'], ls_Kep=['--'], lw=1, labels_sim=['Simulated'], labels_Kep=['Kepler'], xticks_custom=None, xlabel_text='x', ylabel_text='CDF', afs=20, tfs=20, lfs=16, legend=False, fig_size=(8, 4), fig_lbrt=[0.15, 0.2, 0.95, 0.925], save_name='no_name_fig.pdf', save_fig=False)

Plot a figure with CDF(s) of discrete integer values.

Analogous to the function syssimpyplots.plot_catalogs.plot_fig_cdf_simple() but for integer values; uses almost all of the same parameters.

Plot a gallery of systems to visualize their architectures.

Parameters:
  • x_per_sys (list[array[float]] or 2-d array[float]) – The properties of the planets in each system to plot on the x-axis. This can be a list of 1-d arrays, or a 2-d array (where each row is a separate system, potentially with padded values), typically of the orbital period (days).

  • s_per_sys (list[array[float]] or 2-d array[float]) – The properties of the planets in each system to plot as the sizes of the points (which will be proportional to the squared values of s_per_sys). This can be a list of 1-d arrays, or a 2-d array (where each row is a separate system, potentially with padded values), typically of the planet radii (Earth radii).

  • x_min (float, default=2.) – The lower limit for the x-axis.

  • x_max (float, default=300.) – The upper limit for the x-axis.

  • log_x (bool, default=True) – Whether to plot the x-axis on a log-scale.

  • s_norm (float, default=2.) – The normalization for the sizes of the points.

  • alpha (float or list/array[float], optional) – The transparency of the points, between 0 (transparent) and 1 (opaque). Can be a 1-d list/array to assign a different alpha to each system.

  • color_by ({'k', 'size_order', 'custom'}) – A string indicating the way the points are colored. The options are: ‘k’ to color all points in black; ‘size_order’ to color the points by their size ordering; ‘custom’ to color the points by custom values given by colors_per_sys.

  • colors_per_sys (array[float], optional) – A 2-d array for coloring the planets in each system, used if color_by=’custom’.

  • det_per_sys (array[float], optional) – A 2-d array indicating which planets in each system are detected. If provided, will mark undetected planets with red outlines.

  • llabel_per_sys (array[float], optional) – A 1-d array for left-labeling each system.

  • llabel_text (str, optional) – The label for the left-labelings of each system.

  • llabel_fmt (str, optional) – The string formatting of the left-labels in llabel_per_sys.

  • rlabel_per_sys (array[float], optional) – A 1-d array for right-labeling each system.

  • rlabel_text (str, optional) – The label for the right-labelings of each system.

  • rlabel_fmt (str, optional) – The string formatting of the right-labels in rlabel_per_sys.

  • xticks_custom (list or array[float], optional) – The x-values at which to plot ticks.

  • xlabel_text (str, default=r'Period $P$ (days)') – The x-axis label.

  • title (str, optional) – The title for the figures.

  • legend (bool, default=False) – Whether to plot a legend. Note that this will not make an actual legend object, but will simply plot an additional “system” at the top with several example planets of sizes given by s_examples.

  • s_examples (list or array[float], default=[1.,3.,10.]) – The example planet sizes to plot in the legend. Must have the same units as the values in s_per_sys.

  • s_units (str, default=r'$R_oplus$') – The text for displaying the units in the legend.

  • legend_fmt (str, default=r'${:.0f}$') – The string formatter for the example values in the legend.

  • cmap (str or colormap, default='inferno') – The colormap to use for coloring the planets. Only used if color_by=’custom’ and colors_per_sys is provided.

  • vmin (float, optional) – The minimum value to map to the colormap. Only used if color_by=’custom’ and colors_per_sys is provided.

  • vmax (float, optional) – The maximum value to map to the colormap. Only used if color_by=’custom’ and colors_per_sys is provided.

  • cbar_label (str, default=r'Colorscale units') – The colorbar label. Only used if color_by=’custom’ and colors_per_sys is provided.

  • cbar_lbrt (list[float], default=[0.1, 0.95, 0.9, 0.98]) – The positions of the (left, bottom, right, and top) margins of the colorbar panel (all values must be between 0 and 1). Only used if color_by=’custom’ and colors_per_sys is provided; make sure this does not overlap with fig_lbrt!

  • afs (int, default=16) – The axes fontsize.

  • tfs (int, default=16) – The text fontsize.

  • lfs (int, default=8) – The labels fontsize.

  • sys_per_fig (int, default=100) – The number of systems to plot on each figure.

  • line_every (int, default=1) – The number of systems before a horizontal line is plotted.

  • max_figs (int, default=5) – The maximum number of figures to generate.

  • fig_size (tuple, default=(4,8)) – The figure size.

  • fig_lbrt (list[float], default=[0.1, 0.1, 0.9, 0.95]) – The positions of the (left, bottom, right, and top) margins of the plotting panel (all values must be between 0 and 1). If a colorbar will also be shown, make sure this does not overlap with cbar_lbrt!

  • save_name_base (str, default='gallery') – The start of the file names for saving each figure.

  • save_fmt (str, default='png') – The file format for saving each figure (e.g., ‘png’, ‘pdf’, ‘eps’, ‘jpg’, etc.).

  • save_fig (bool, default=False) – Whether to save the figures. If True, will save each figure in the working directory with the file names given by save_name_base with an index appended.

Plot a gallery of systems from an observed catalog.

Filters, samples, and sorts the systems before plotting them using the function syssimpyplots.plot_catalogs.plot_figs_systems_gallery().

Parameters:
  • ss_per_sys (dict) – The dictionary containing the planetary and stellar properties for each system in an observed catalog (2-d and 1-d arrays). Can be a simulated catalog (i.e. returned by syssimpyplots.load_sims.compute_summary_stats_from_cat_obs()) or a Kepler catalog (i.e. returned by syssimpyplots.compare_kepler.compute_summary_stats_from_Kepler_catalog()).

  • sort_by ({'inner', 'multiplicity', 'stellar_mass'}, optional) – The property to sort the systems by. Default is None (no sorting).

  • n_min (int, default=3) – The minimum number of observed planets a system must have to be included.

  • n_max (int, default=20) – The maximum number of observed planets a system must have to be included.

  • llabel ({'multiplicity', 'stellar_mass'}, optional) – The property to left-label each system with. Default is None (no left-labels).

The remaining parameters are described in the documentation for the function syssimpyplots.plot_catalogs.plot_figs_systems_gallery().

Plot a gallery of systems from a physical catalog.

Filters, samples, and sorts the systems before plotting them using the function syssimpyplots.plot_catalogs.plot_figs_systems_gallery().

Parameters:
  • sssp_per_sys (dict) – The dictionary containing the planetary and stellar properties for each system in a physical catalog (2-d and 1-d arrays), such as one returned by syssimpyplots.load_sims.compute_summary_stats_from_cat_phys()).

  • sort_by ({'inner', 'multiplicity', 'stellar_mass'}, optional) – The property to sort the systems by. Default is None (no sorting).

  • n_min (int, default=3) – The minimum number of physical planets a system must have to be included.

  • n_max (int, default=20) – The maximum number of physical planets a system must have to be included.

  • n_det_min (int, default=1) – The minimum number of detected planets a system must have to be included.

  • n_det_max (int, default=10) – The maximum number of detected planets a system must have to be included.

  • color_by ({'k', 'size_order', 'cluster', 'mass', 'eccentricity', 'AMD'}) – The way in which the planets are colored.

  • llabel ({'multiplicity', 'stellar_mass'}, optional) – The property to left-label each system with.

  • mark_det (bool, default=True) – Whether to mark the detected and undetected planets separately.

The remaining parameters are described in the documentation for the function syssimpyplots.plot_catalogs.plot_figs_systems_gallery().

Note

The mark_det=True option requires the sssp_per_sys object to have been generated with load_full_tables=True and match_observed=True!