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

Merge branch 'plot_walkers_sanity_check_labels' into 'master'

Add sanity_check on labels for plot_walkers

See merge request !794
parents 3affb71b 47f1ba38
No related branches found
No related tags found
1 merge request!794Add sanity_check on labels for plot_walkers
Pipeline #131405 failed
...@@ -1123,15 +1123,16 @@ class Result(object): ...@@ -1123,15 +1123,16 @@ class Result(object):
idxs = np.arange(nsteps) idxs = np.arange(nsteps)
fig, axes = plt.subplots(nrows=ndim, figsize=(6, 3 * ndim)) fig, axes = plt.subplots(nrows=ndim, figsize=(6, 3 * ndim))
walkers = self.walkers[:, :, :] walkers = self.walkers[:, :, :]
parameter_labels = sanity_check_labels(self.parameter_labels)
for i, ax in enumerate(axes): for i, ax in enumerate(axes):
ax.plot(idxs[:self.nburn + 1], walkers[:, :self.nburn + 1, i].T, ax.plot(idxs[:self.nburn + 1], walkers[:, :self.nburn + 1, i].T,
lw=0.1, color='r') lw=0.1, color='r')
ax.set_ylabel(self.parameter_labels[i]) ax.set_ylabel(parameter_labels[i])
for i, ax in enumerate(axes): for i, ax in enumerate(axes):
ax.plot(idxs[self.nburn:], walkers[:, self.nburn:, i].T, lw=0.1, ax.plot(idxs[self.nburn:], walkers[:, self.nburn:, i].T, lw=0.1,
color='k') color='k')
ax.set_ylabel(self.parameter_labels[i]) ax.set_ylabel(parameter_labels[i])
fig.tight_layout() fig.tight_layout()
outdir = self._safe_outdir_creation(kwargs.get('outdir'), self.plot_walkers) outdir = self._safe_outdir_creation(kwargs.get('outdir'), self.plot_walkers)
......
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