@@ -36,7 +36,7 @@ for file_type in file_types
3636
3737 # Plot results
3838 plot_params = (linewidth= 2. , dpi= 300 )
39- paramNames = [" gNa " " gK " " gL " " σ" ]
39+ paramNames = [" p₁ " " p₂ " " p₃ " " σ" ]
4040
4141 # Plot acceptance rate
4242 plot ([mean (accepts[max (i- 499 ,1 ): i]) for i in 1 : numSamples], xlabel= " Iteration" ,
@@ -56,11 +56,16 @@ for file_type in file_types
5656
5757 # Plot parameter convergence
5858 pTrueWithNoise = [1.0 , 1.0 , 1.0 , 2.0 ]
59- order = [4 , 3 , 1 , 2 ] # TODO : Order needs fixing so all are visible
60- plot (chain[:,order]. / pTrueWithNoise[order]' , label= paramNames[order ' ] , xticks= ([0 ,20000 ,40000 ],[" 0" ," 2×10⁵" ," 4×10⁵" ]),
59+ order = [4 , 3 , 1 , 2 ]
60+ plot (chain[:,order]. / pTrueWithNoise[order]' , label= " " , xticks= ([0 ,20000 ,40000 ],[" 0" ," 2×10⁵" ," 4×10⁵" ]),
6161 xlabel= " Iteration" , xlim= (0 ,numSamples);
6262 plot_params... )
63+ # Hodge podge of lines in the right order for the legend
64+ for i in 1 : 4
65+ plot! ([- 1 ], [- 1 ], label= paramNames[i], color= findfirst (i.== order); plot_params... )
66+ end
6367 vline! ([numSamples* 0.25 + 0.5 ], label= " Burn In" , color= :red , linewidth= 1.5 , linestyle= :dot )
68+ ylims! (0.7 ,1.2 )
6469 plots = [plots... vline! ([numSamples* 0.1 + 0.5 ], label= " Adaption" , color= :green , linewidth= 1.5 , linestyle= :dot , legend= nothing )]
6570
6671 # Plot posterior histograms
0 commit comments