Skip to content
Snippets Groups Projects
Commit 51a38042 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'plot_multiple_kwargs_corner_labels' into 'master'

Adding corner_labels input in plot_multiple to break ambiguity with existing labels input

Closes #486

See merge request !788
parents cc7a4acf d2487431
No related branches found
No related tags found
No related merge requests found
......@@ -1525,7 +1525,7 @@ class ResultList(list):
@latex_plot_format
def plot_multiple(results, filename=None, labels=None, colours=None,
save=True, evidences=False, **kwargs):
save=True, evidences=False, corner_labels=None, **kwargs):
""" Generate a corner plot overlaying two sets of results
Parameters
......@@ -1545,12 +1545,16 @@ def plot_multiple(results, filename=None, labels=None, colours=None,
save: bool
If true, save the figure
kwargs: dict
All other keyword arguments are passed to `result.plot_corner`.
All other keyword arguments are passed to `result.plot_corner` (except
for the keyword `labels` for which you should use the dedicated
`corner_labels` input).
However, `show_titles` and `truths` are ignored since they would be
ambiguous on such a plot.
evidences: bool, optional
Add the log-evidence calculations to the legend. If available, the
Bayes factor will be used instead.
corner_labels: list, optional
List of strings to be passed to the input `labels` to `result.plot_corner`.
Returns
-------
......@@ -1561,6 +1565,8 @@ def plot_multiple(results, filename=None, labels=None, colours=None,
kwargs['show_titles'] = False
kwargs['truths'] = None
if corner_labels is not None:
kwargs['labels'] = corner_labels
fig = results[0].plot_corner(save=False, **kwargs)
default_filename = '{}/{}'.format(results[0].outdir, 'combined')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment