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

Merge branch 'add-fix-for-corner-plot-with-single-parameter' into 'master'

Adds a simple fix for cases one dimension result corner plots

See merge request !809
parents e7019e9e 1e1c696a
No related branches found
No related tags found
1 merge request!809Adds a simple fix for cases one dimension result corner plots
Pipeline #134179 failed
......@@ -1093,7 +1093,15 @@ class Result(object):
# Create the data array to plot and pass everything to corner
xs = self.posterior[plot_parameter_keys].values
fig = corner.corner(xs, **kwargs)
if len(plot_parameter_keys) > 1:
fig = corner.corner(xs, **kwargs)
else:
ax = kwargs.get("ax", plt.subplot())
ax.hist(xs, bins=kwargs["bins"], color=kwargs["color"],
histtype="step", **kwargs["hist_kwargs"])
ax.set_xlabel(kwargs["labels"][0])
fig = plt.gcf()
axes = fig.get_axes()
# Add the titles
......
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