atompy.Hist1d.for_step#

property Hist1d.for_step#

Returns right edges and bin-values

By default, matplotlib.axes.Axes.step() needs the right edges of a bin and the corresponding bin value. See the where keyword argument.

Returns:
right_edgesndarray

right edges, that is, Hist1d.edges[1:].

bin_valuesndarray

bin values, that is, Hist1d.histogram.

Examples

# 'hist' is a Hist1d object
plt.step(*hist.for_step)

# doesn't work if you specify anything else but 'pre' as a
# plt.step keyword
plt.step(*hist.for_step, where="mid") # this will have shifted bins