2020-03-06 02:24:32 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
import numpy as np
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
bins = input()
|
|
|
|
step = input()
|
|
|
|
bins = int(bins.split("\t")[1])
|
|
|
|
step = float(step.split("\t")[1])
|
|
|
|
counts = np.loadtxt(sys.stdin)
|
|
|
|
edges = np.linspace(0, bins*step, bins+1)
|
|
|
|
|
|
|
|
plt.rcParams['font.size'] = 17
|
|
|
|
|
|
|
|
plt.hist(edges[:-1], edges, weights=counts,
|
2020-05-12 22:38:14 +02:00
|
|
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
2020-03-06 02:24:32 +01:00
|
|
|
plt.title('Vertical component distribution', loc='right')
|
|
|
|
plt.xlabel(r'$p_h$')
|
|
|
|
plt.ylabel(r'$\left<|p_v|\right>$')
|
|
|
|
|
|
|
|
plt.show()
|