2020-03-06 02:24:32 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2020-05-31 18:56:25 +02:00
|
|
|
from matplotlib import pyplot as plt
|
|
|
|
import numpy as np
|
2020-03-06 02:24:32 +01:00
|
|
|
import sys
|
2020-03-17 23:01:01 +01:00
|
|
|
|
2020-05-31 18:56:25 +02:00
|
|
|
a, b, f = np.loadtxt(sys.stdin, unpack=True)
|
2020-03-06 02:24:32 +01:00
|
|
|
|
2020-05-31 18:56:25 +02:00
|
|
|
plt.figure()
|
|
|
|
# plt.figure(figsize=(5, 3))
|
|
|
|
# plt.rcParams['font.size'] = 8
|
2020-05-21 18:47:44 +02:00
|
|
|
|
2020-05-31 18:56:25 +02:00
|
|
|
plt.title(sys.argv[1] if len(sys.argv) > 1 else "", loc='right')
|
|
|
|
plt.xlabel(r'$\theta$ (radians)')
|
|
|
|
plt.ylabel(r'$I(\theta)$ (a.u.)')
|
|
|
|
plt.hist(a, np.insert(b, 0, a[0]), weights=100*f/sum(f),
|
|
|
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
|
|
|
|
|
|
|
plt.tight_layout()
|
|
|
|
plt.show()
|
|
|
|
# name = sys.argv[2] if len(sys.argv) > 1 else "prova"
|
|
|
|
# plt.savefig('notes/images/' + name + '.pdf')
|