analistica/ex-1/plot.py
2020-03-06 02:24:32 +01:00

11 lines
254 B
Python
Executable File

#!/usr/bin/env python
from pylab import *
import sys
a, b, f = loadtxt(sys.stdin, unpack=True)
title('Landau distribution sampling', loc='right')
hist(a, np.insert(b, 0, a[0]), weights=f/sum(f))
annotate(f'N={sum(f)}\nbins={len(f)}', (50, 0.2))
show()