mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
synced 2024-12-22 03:23:34 +01:00
PDFs: save all Axes as separate figures
This commit is contained in:
parent
a32ae6b2ef
commit
770c49a646
1 changed files with 25 additions and 6 deletions
|
@ -93,8 +93,6 @@ if True:
|
||||||
amplitudes = np.linspace(0,amp_max*5,500)
|
amplitudes = np.linspace(0,amp_max*5,500)
|
||||||
signals = np.linspace(0.1,signal_max*5,101)
|
signals = np.linspace(0.1,signal_max*5,101)
|
||||||
if False:
|
if False:
|
||||||
fig2, ax2 = plt.subplots(2,2,figsize=(2*8,2*8))
|
|
||||||
ax2 = fig2.get_axes()
|
|
||||||
V_theta = [variance(thetas,phase_distribution(thetas,sigma,s)) for s in signals ]
|
V_theta = [variance(thetas,phase_distribution(thetas,sigma,s)) for s in signals ]
|
||||||
E_theta=[expectation(thetas,phase_distribution(thetas,sigma,s)) for s in signals ]
|
E_theta=[expectation(thetas,phase_distribution(thetas,sigma,s)) for s in signals ]
|
||||||
V_theta_g = [variance(thetas,phase_distribution_gauss(thetas,sigma,s)) for s in signals ]
|
V_theta_g = [variance(thetas,phase_distribution_gauss(thetas,sigma,s)) for s in signals ]
|
||||||
|
@ -104,6 +102,18 @@ if False:
|
||||||
V_a_g = [variance(amplitudes,amplitude_distribution_gauss(amplitudes,sigma,s)) for s in signals ]
|
V_a_g = [variance(amplitudes,amplitude_distribution_gauss(amplitudes,sigma,s)) for s in signals ]
|
||||||
E_a_g=[expectation(amplitudes,amplitude_distribution_gauss(amplitudes,sigma,s)) for s in signals ]
|
E_a_g=[expectation(amplitudes,amplitude_distribution_gauss(amplitudes,sigma,s)) for s in signals ]
|
||||||
|
|
||||||
|
fig2, _ax2 = plt.subplots(2,2,figsize=(2*8,2*8))
|
||||||
|
ax2 = fig2.get_axes()
|
||||||
|
if True:
|
||||||
|
_figs = []
|
||||||
|
_axs = []
|
||||||
|
for i, ax in enumerate(_ax2):
|
||||||
|
_f, _a = plt.subplots(1,1, figsize=(1*8, 1*8))
|
||||||
|
_figs.append(_f)
|
||||||
|
_axs.append(_a)
|
||||||
|
|
||||||
|
ax2[i] = MethodProxy(ax2[0], _a)
|
||||||
|
|
||||||
ax2[0].plot(signals,E_a,label='$p(a)$')
|
ax2[0].plot(signals,E_a,label='$p(a)$')
|
||||||
ax2[0].plot(signals,E_a_g,ls='dashed',label='Gaussian approx.')
|
ax2[0].plot(signals,E_a_g,ls='dashed',label='Gaussian approx.')
|
||||||
ax2[0].set_xscale('log')
|
ax2[0].set_xscale('log')
|
||||||
|
@ -133,6 +143,15 @@ if False:
|
||||||
|
|
||||||
fig2.tight_layout()
|
fig2.tight_layout()
|
||||||
fig2.savefig('expectation_variance.pdf')
|
fig2.savefig('expectation_variance.pdf')
|
||||||
|
for i, _f in enumerate(_figs):
|
||||||
|
fnames = [
|
||||||
|
'amplitude_mean',
|
||||||
|
'amplitude_sigma',
|
||||||
|
'phase_mean',
|
||||||
|
'phase_sigma',
|
||||||
|
][i]
|
||||||
|
_f.savefig(fnames+'.pdf')
|
||||||
|
plt.close(_f)
|
||||||
|
|
||||||
## figure 3, beacon timing accuracy
|
## figure 3, beacon timing accuracy
|
||||||
if True:
|
if True:
|
||||||
|
|
Loading…
Reference in a new issue