histogram_line
- sherpa.plot.utils.histogram_line(xlo, xhi, y)[source] [edit on github]
Manually create x, y arrays to replicate a histogram
Draw the data as a histogram, manually creating the lines from the low to high edge of each bin. In the case on non-consequtive bins, the line will have some nan values, so that disjoint lines are drawn.
In matplotlib, an alternative would be to create RectanglePatches, one for each bin, but I don’t want each bin to go down to 0. I do not find the existing drawstyle options to be sufficient.
- Parameters:
- Returns:
- x, y2
array x and y arrays for plotting the histogram line.
- x, y2