2020-06-05 23:43:54 +02:00
|
|
|
|
from matplotlib import pyplot as plt
|
|
|
|
|
import numpy as np
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def moyal(x, μ, σ):
|
|
|
|
|
N = (1)/(np.sqrt(2 * np.pi) * σ)
|
|
|
|
|
return N * np.exp(- 0.5 * ((x - μ)/σ + np.exp(- (x - μ)/σ)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# prepare plot
|
|
|
|
|
# plt.figure()
|
|
|
|
|
plt.figure(figsize=(3, 2))
|
|
|
|
|
plt.rcParams['font.size'] = 8
|
2020-06-06 09:58:00 +02:00
|
|
|
|
plt.ylim = (-0.02, 0.23)
|
2020-06-05 23:43:54 +02:00
|
|
|
|
|
|
|
|
|
# do plot
|
|
|
|
|
x = np.arange(-10, 30, 0.01)
|
2020-06-06 09:58:00 +02:00
|
|
|
|
μ = -0.22278298
|
|
|
|
|
σ = 1.1191486
|
|
|
|
|
plt.plot(x, moyal(x, μ, σ), color='gray')
|
2020-06-05 23:43:54 +02:00
|
|
|
|
|
|
|
|
|
# save fig
|
|
|
|
|
plt.tight_layout()
|
|
|
|
|
# plt.show()
|
|
|
|
|
plt.savefig('slides/images/moyal-pdf.pdf', transparent=True)
|