MNGuenther / allesfitter

allesfitter is a convenient wrapper around the packages ellc (light curve and RV models), dynesty (static and dynamic nested sampling) emcee (Markov Chain Monte Carlo sampling) and celerite (Gaussian Process models).
MIT License
60 stars 36 forks source link

plot_MCMC_corner() breaks in 1D #43

Closed altuson closed 2 years ago

altuson commented 2 years ago

I'm fitting an RV data set with only one variable, K. In mcmc_output.py lines 203-205, the code breaks with error:

AttributeError: 'numpy.ndarray' object has no attribute 'set_title'

To fix it, I changed lines 203-205 to:

caxes[i,i].set_title(ctitle) caxes[i,i].xaxis.set_label_coords(0.5, -0.5) caxes[i,i].yaxis.set_label_coords(-0.5, 0.5)

This now works and I just wanted to let you know about it.

MNGuenther commented 2 years ago

Ha, peculiar, I thought this was tested and working (after all, it has the if/else clause in it for this). Thanks a lot for uncovering this and providing the solution right with it! I've changed this locally in mcmc_ouput.py and nested_sampling_output.py and will push it with a future v1.2.8 release!