for_plot#
- Hist1d.for_plot()[source]#
Return arrays appropriate for plotting with
plt.plot.Examples
Plot
hist: Hist1d:plt.plot(*hist.for_plot())
Convinient, if you want to chain histogram operations and then plot them. E.g., this:
plt.plot(hist.keep(lower, upper).rebin(2).centers, hist.keep(lower, upper).rebin(2).norm_to_integral().values)
becomes:
plt.plot(*hist.keep(lower, upper).rebin(2).norm_to_integral().for_plot())