core.result.make_pp_plot
core.result.make_pp_plot(
results,
filename=None,
save=True,
confidence_interval=[0.68, 0.95, 0.997],
lines=None,
legend_fontsize='x-small',
keys=None,
title=True,
confidence_interval_alpha=0.1,
weighted=False,
**kwargs,
)Make a P-P plot for a set of runs with injected signals.
Adapted from Bilby.
Parameters
results: list[Result] A list of Result objects, each of these should have injected_parameters filename: str, optional The name of the file to save, the default is “outdir/pp.png” save: bool, optional Whether to save the file, default=True confidence_interval: (float, list), optional The confidence interval to be plotted, defaulting to 1-2-3 sigma lines: list If given, a list of matplotlib line formats to use, must be greater than the number of parameters. legend_fontsize: float The font size for the legend keys: list A list of keys to use, if None defaults to search_parameter_keys title: bool Whether to add the number of results and total p-value as a plot title confidence_interval_alpha: float, list, optional The transparency for the background condifence interval weighted: bool, optional Whether to use weighted vs unweighted samples. It is useful to make PP plots using unweighted samples to test networks without importance sampling. kwargs: Additional kwargs to pass to matplotlib.pyplot.plot
Returns
fig, pvals: matplotlib figure and a NamedTuple with attributes combined_pvalue, pvalues, and names.