ex-4: created a program for plotting the expected distribution

This commit is contained in:
Giù Marcer 2020-04-23 23:58:08 +02:00 committed by rnhmjoj
parent 15079ff587
commit 87beaa2248
2 changed files with 24 additions and 0 deletions

24
ex-4/note.py Normal file
View File

@ -0,0 +1,24 @@
import matplotlib.pyplot as plt
import numpy as np
p_max = 10
def f(x):
return x * np.log(p_max/x)/np.arctan(np.sqrt(p_max**2/x**2 - 1))
def main():
x = np.arange(0, 10, 0.001)
y = f(x)
plt.rcParams['font.size'] = 20
plt.figure()
plt.title('Expected distribution', loc='right')
plt.ylabel('$\\langle |P_v| \\rangle$')
plt.xlabel('$P_h$')
plt.plot(x, y, c='#92182b')
plt.show()
if __name__ == '__main__':
main()

BIN
notes/images/expected.pdf Normal file

Binary file not shown.