diff --git a/README.md b/README.md index bbe2d2368f326d4771eddba2a5f0b4cdcc36fc98..fb17b69174a5244655ed3e7a1a9a47ddb9127473 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ $ git clone git@gitlab.aei.uni-hannover.de:GregAshton/PyFstat.git `pyfstat` makes uses the following external python modules: * [numpy](http://www.numpy.org/) -* [matplotlib](http://matplotlib.org/) +* [matplotlib](http://matplotlib.org/) >= 1.4 * [scipy](https://www.scipy.org/) * [emcee](http://dan.iel.fm/emcee/current/) * [corner](https://pypi.python.org/pypi/corner/) diff --git a/pyfstat/mcmc_based_searches.py b/pyfstat/mcmc_based_searches.py index aae72a68c641819edf675eb56a8531f5c5c444d3..7bd26f0a9b17d8ab04856cc60a100a3bc40b66b2 100644 --- a/pyfstat/mcmc_based_searches.py +++ b/pyfstat/mcmc_based_searches.py @@ -771,9 +771,14 @@ class MCMCSearch(core.BaseSearchClass): def _plot_walkers(self, sampler, symbols=None, alpha=0.4, color="k", temp=0, lw=0.1, nprod=0, add_det_stat_burnin=False, fig=None, axes=None, xoffset=0, plot_det_stat=False, - context='classic', subtractions=None, labelpad=0.05): + context='ggplot', subtractions=None, labelpad=0.05): """ Plot all the chains from a sampler """ + if context not in plt.style.available: + raise ValueError(( + 'The requested context {} is not available; please select a' + ' context from `plt.style.available`').format(context)) + if np.ndim(axes) > 1: axes = axes.flatten() diff --git a/requirements.txt b/requirements.txt index c34c50800322d36c45aa10ac0d5faa24e8dec9c4..02f6554599ffa80e880845a8b2a873ab256227d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ numpy -matplotlib +matplotlib>=1.4 scipy emcee corner