Module dcg_sci_tool.plot.plot_frequency_histogram

Functions

def plot_frequency_histogram(data: List[float] | numpy.ndarray,
n_bins: int,
title: str = 'Frequency Distribution Histogram',
xlabel: str = 'Value',
ylabel: str = 'Frequency',
show_table: bool = True) ‑> Dict

Manually implement frequency distribution histogram: Divide data into n_bins intervals and count the frequency of each interval

Args

data
Input data list or array
n_bins
Number of bins on x-axis
title
Chart title
xlabel
x-axis label
ylabel
y-axis label
show_table
Whether to show frequency distribution table

Returns

Dictionary containing frequency statistics