analistica/misc/plot
2020-03-06 02:24:32 +01:00

16 lines
401 B
Python
Executable File

#!/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()