# Necessary import evil
%matplotlib inline
import physt
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(42) # Repeatable results
data = np.random.normal(150, 25, 1000000)
h = physt.h1(data)
h.plot(show_stats=True);
h = physt.h1(data, weights=data)
h.plot(show_stats=True);
h = physt.h1(data, range=(120, 140))
h.plot(show_stats=True);
h._stats
{'sum': 30131858.028689485, 'sum2': 3955251423.8946447}