swyft.plot#
- swyft.plot.plot_corner(lrs_coll, parnames, bins=100, figsize=None, color='k', labels=None, label_args={}, contours_1d=True, fig=None, smooth=0.0, cred_level=[0.68268, 0.9545, 0.9973], truth=None, smooth_prior=False)[source]#
Make a beautiful corner plot.
- Parameters:
lrs_coll – Collection of swyft.LogRatioSamples objects
parnames – List of parameters of interest
bins – Number of bins used for histograms.
figsize – Size of figure
color – Color
labels – Optional custom labels, either list or dict.
label_args – Custom label arguments
contours_1d (bool) – Plot 1-dim contours
fig – Figure instance
smooth – histogram smoothing
cred_level – Credible levels for contours
truth – Dictionary with parameters names as keys and true values
smooth_prior – Smooth and histogram prior instead of posterior (default False)
- Return type:
None
- swyft.plot.plot_pair(lrs_coll, parnames=None, bins=100, figsize=None, color='k', labels=None, label_args={}, ncol=None, subplots_kwargs={}, fig=None, smooth=1.0, cred_level=[0.68268, 0.9545, 0.9973], truth=None, smooth_prior=False)[source]#
Make beautiful 2-dim posteriors.
- Parameters:
lrs_coll – Collection of swyft.LogRatioSamples objects
parnames – (Optional) List of parameter pairs of interest
bins – Number of bins used for histograms.
figsize – Optional size of figure
color – Color
labels – (Optional) Custom labels
label_args – (Pptional) Custom label arguments
ncol – (Optional) Number of panel columns
subplots_kwargs – Optional arguments for subplots generation.
fig – Optional figure instance
smooth – Gaussian smothing scale
cred_level – Credible levels for contours
truth – (Optional) Dictionary with parameters names as keys and true values
smooth_prior – Smooth and histogram prior instead of posterior (default False)
- Return type:
None
- swyft.plot.plot_posterior(lrs_coll, parnames=None, bins=100, figsize=None, color='k', labels=None, label_args={}, ncol=None, subplots_kwargs={}, fig=None, contours=True, smooth=1.0, cred_level=[0.68268, 0.9545, 0.9973], truth=None, smooth_prior=False)[source]#
Make beautiful 1-dim posteriors.
- Parameters:
lrs_coll – Collection of swyft.LogRatioSamples objects
parnames – (Optional) List of parameters of interest
bins – Number of bins used for histograms.
figsize – Optional size of figure
color – Color
labels – (Optional) Custom labels
label_args – (Pptional) Custom label arguments
ncol – (Optional) Number of panel columns
subplots_kwargs – Optional arguments for subplots generation.
fig – Optional figure instance
contours – Plot 1-dim contours
smooth – Gaussian smothing scale
cred_level – Credible levels for contours
truth – (Optional) Dictionary with parameters names as keys and true values
smooth_prior – Smooth and histogram prior instead of posterior (default False)
- Return type:
None
- swyft.plot.plot_pp(coverage_samples, params, z_max=3.5, bins=50, ax=None)[source]#
Make a pp plot.
- Parameters:
coverage_samples – Collection of CoverageSamples object
params (str | Sequence[str]) – Parameters of interest
z_max (float) – Maximum value of z.
bins (int) – Number of discretization bins.
ax – Optional axes instance.
- swyft.plot.plot_zz(coverage_samples, params, z_max=3.5, bins=50, ax=None)[source]#
Make a zz plot.
- Parameters:
coverage_samples – Collection of CoverageSamples object
params (str | Sequence[str]) – Parameters of interest
z_max (float) – Maximum value of z.
bins (int) – Number of discretization bins.
ax – Optional axes instance.