#!/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, color='#eacf00', edgecolor='#3d3d3c') plt.title('Vertical component distribution', loc='right') plt.xlabel(r'$p_h$') plt.ylabel(r'$\left<|p_v|\right>$') plt.show()