
histogram¶
-
class
reliability.Other_functions.
histogram
¶ Plots a histogram using the data specified. This is similar to plt.hist except that it sets better defaults and also shades the bins white above a specified value (white_above). This is useful for representing complete data as right censored data in a histogram.
Parameters: - data (array, list) – The data to plot in the histogram.
- white_above (float, int, optional) – Bins above this value will be shaded white to represent right censored data. Default = None.
- bins (array, string, optional) – An array of bin edges or a string to specify how to calculate the bin edges. Acceptable strings are ‘auto’,’fd’,’doane’,’scott’,’stone’, ‘rice’,’sturges’,’sqrt’. Default = ‘auto’. For more information on these methods, see the numpy documentation: https://numpy.org/doc/stable/reference/generated/numpy.histogram_bin_edges.html
- density (bool, optional) – Determines whether to plot a density histogram or a count histogram. Default = True which is required when plotting a PDF or CDF.
- cumulative (bool, optional) – Use False for PDF and True for CDF. Default = False.
- kwargs – Plotting kwargs for the histogram (color, alpha, etc.) which are passed to matplotlib.
Returns: None