2020-03-06 02:24:32 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from pylab import *
|
|
|
|
import sys
|
2020-03-17 23:01:01 +01:00
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
|
|
|
plt.rcParams['font.size'] = 20
|
2020-03-06 02:24:32 +01:00
|
|
|
|
|
|
|
a, b, f = loadtxt(sys.stdin, unpack=True)
|
|
|
|
suptitle('Fraunhofer diffraction')
|
|
|
|
title(sys.argv[1] if len(sys.argv) > 1 else "", loc='right')
|
|
|
|
hist(a, np.insert(b, 0, a[0]), weights=f/sum(f),
|
|
|
|
color='#dbbf0d', edgecolor='#595856', linewidth=0.5)
|
|
|
|
show()
|