Commit 28901924 authored by John Douglas Veitch's avatar John Douglas Veitch

bayespputils: Recover from 1D plotting errors

parent bf3b1517
......@@ -7581,7 +7581,10 @@ def make_1d_table(html,legend,label,pos,pars,noacf,GreedyRes,onepdfdir,sampsdir,
last_color = lines[-1].get_color()
plt.axvline(acl/Nskip, linestyle='-.', color=last_color)
plt.title('ACL = %i N = %i'%(acl,Neff))
except FloatingPointError:
acffig.savefig(os.path.join(sampsdir,figname.replace('.png','_acf.png')))
if(savepdfs): acffig.savefig(os.path.join(sampsdir,figname.replace('.png','_acf.pdf')))
plt.close(acffig)
except:
# Ignore
acfail=1
pass
......@@ -7602,15 +7605,14 @@ def make_1d_table(html,legend,label,pos,pars,noacf,GreedyRes,onepdfdir,sampsdir,
plt.title('Autocorrelation Function')
else:
plt.title('ACL = %i N = %i'%(max(acls),Nsamps))
except FloatingPointError:
acffig.savefig(os.path.join(sampsdir,figname.replace('.png','_acf.png')))
if(savepdfs): acffig.savefig(os.path.join(sampsdir,figname.replace('.png','_acf.pdf')))
plt.close(acffig)
except:
# Ignore
acfail=1
pass
acffig.savefig(os.path.join(sampsdir,figname.replace('.png','_acf.png')))
if(savepdfs): acffig.savefig(os.path.join(sampsdir,figname.replace('.png','_acf.pdf')))
plt.close(acffig)
if not noacf:
if not acfail:
acfhtml='<td width="30%"><img width="100%" src="1Dsamps/'+figname.replace('.png', '_acf.png')+'"/></td>'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment