From b8b21286a14487bbb2d1ff294ee44bc817e1dfb0 Mon Sep 17 00:00:00 2001 From: jeanpouget-abadie Date: Thu, 5 Nov 2015 17:04:37 -0500 Subject: making hist plot prettier --- simulation/bayes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'simulation/bayes.py') diff --git a/simulation/bayes.py b/simulation/bayes.py index 5dcd48c..5114f70 100644 --- a/simulation/bayes.py +++ b/simulation/bayes.py @@ -87,7 +87,9 @@ if __name__=="__main__": for i in xrange(len(g)): for j in xrange(len(g)): ax[i,j].locator_params(nbins=3, axis='x') - ax[i,j].hist(mcmc.trace('theta_{}{}'.format(i,j))[:]) + ax[i,j].hist(mcmc.trace('theta_{}{}'.format(i,j))[:], normed=True) + ax[i, j].set_xlim([0,1]) + ax[i, j].plot([g[i, j]]*2, [0, ax[i,j].get_ylim()[-1]], color='red') plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=.1) plt.show() -- cgit v1.2.3-70-g09d2