#!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np import sys lows, upps, values = np.loadtxt(sys.stdin, unpack=True,) dim = upps[1] - lows[1] values = values/np.sum((values)*dim) plt.bar(lows, align='edge', width=dim, height=values, color='#dbbf0d', edgecolor='#595856') plt.annotate("N = 100000\nbins=100", (15, 0.16)) plt.ylabel("pdf(x)") plt.xlabel("x") plt.show()