@@ -64,11 +64,9 @@ for file_type in file_types
6464 plots = [plots... vline! ([numSamples* 0.1 + 0.5 ], label= " Adaption" , color= :green , linewidth= 1.5 , linestyle= :dot , legend= nothing )]
6565
6666 # Plot posterior histograms
67- for i in axes (posterior, 2 )
68- histogram (posterior[:, i], normalize= :pdf , bins= 35 , linecolor= :match ,
69- legend = false ; plot_params... )
70- plots = [plots... vline! ([pTrueWithNoise[i]], color= :black , linewidth= 1.5 )]
71- end
67+ p = corrplot (posterior, label= paramNames, size= (539 ,500 ), xrot= 90 )
68+ plot! (p, subplot= 16 , xformatter= x-> x)
69+ savefig (file_type* " posterior.pdf" )
7270end
7371
7472l = @layout [a b c]
@@ -79,32 +77,10 @@ function plotter(plots, title)
7977 return plot! (legend= :bottomright , subplot= 3 )
8078end
8179
82- plot_ = plotter (plots[1 : 7 : end ], " Acceptance Rate" )
80+ plot_ = plotter (plots[1 : 3 : end ], " Acceptance Rate" )
8381plot! (legend= :topright , subplot= 3 )
8482savefig (" results/mcmc/acceptanceRate.pdf" )
85- plot_ = plotter (plots[2 : 7 : end ], " Log Likelihood" )
83+ plot_ = plotter (plots[2 : 3 : end ], " Log Likelihood" )
8684savefig (" results/mcmc/logLikelihood.pdf" )
87- plot_ = plotter (plots[3 : 7 : end ], " Normalized Parameters" )
85+ plot_ = plotter (plots[3 : 3 : end ], " Normalized Parameters" )
8886savefig (" results/mcmc/convergence.pdf" )
89-
90- function posterior_plotter (plots, xlims)
91- plot (plots... , layout= l, size= (539 ,250 ), dpi= 300 , link= :all , yformatter= :none , title= [" A" " B" " C" ], titlelocation= :left , bottom_margin= 2 Plots. mm, right_margin= 2 Plots. mm)
92- yaxis! (yformatter= x-> x, ylabel= " Density" , subplot= 1 )
93- return xlims! (xlims... )
94- end
95-
96- plot_ = posterior_plotter (plots[4 : 7 : end ], (0.98 , 1.01 ))
97- xlabel! (" gNa" )
98- savefig (" results/mcmc/posterior_gNa.pdf" )
99- plot_ = posterior_plotter (plots[5 : 7 : end ], (0.985 , 1.01 ))
100- xlabel! (" gK" )
101- xticks! ([0.99 , 1.0 , 1.01 ], [" 0.99" , " 1" , " 1.01" ])
102- savefig (" results/mcmc/posterior_gK.pdf" )
103- plot_ = posterior_plotter (plots[6 : 7 : end ], (0.9 , 1.05 ))
104- xlabel! (" gL" )
105- xticks! ([0.9 , 0.95 , 1.0 , 1.05 ], [" 0.9" , " 0.95" , " 1" , " 1.05" ])
106- savefig (" results/mcmc/posterior_gL.pdf" )
107- plot_ = posterior_plotter (plots[7 : 7 : end ], (1.8 , 2.4 ))
108- xlabel! (" σ" )
109- xticks! ([1.8 , 2.0 , 2.2 , 2.4 ], [" 1.8" , " 2" , " 2.2" , " 2.4" ])
110- savefig (" results/mcmc/posterior_σ.pdf" )
0 commit comments