# Necessary import evil
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=["total", "mean"]);
h = physt.h1(data, range=(120, 140))
h.plot(show_stats=True);
h._stats
Statistics(sum=149960006.08864358, sum2=23113238494.210587, min=29.26409978722107, max=266.9737275094181, weight=1000000)
h.total
229977