smftools.analysis.plot.histograms#
histograms.py — Interval distribution histograms with rolling mean, peak calling, and optional Gaussian fit overlay.
Functions
|
Histogram with least-squares Gaussian fit overlay. |
|
Plot a histogram with optional rolling-mean overlay and peak annotations. |
- smftools.analysis.plot.histograms.plot_interval_histogram(values, output_path, title='', xlabel='Value', color='#1f77b4', integer_bins=False, hist_config=None, dpi=300, figsize=(3.5, 2.5))#
Plot a histogram with optional rolling-mean overlay and peak annotations.
- Return type:
Parameters#
- valuesnp.ndarray
1-D float array of observations.
- output_pathPath
File to write.
- titlestr
Axes title.
- xlabelstr
x-axis label.
- colorstr
Bar fill color.
- integer_binsbool
If True, one bar per integer value (for count histograms).
- hist_configdict, optional
Config from
smftools.analysis.config.hmm_histogram.HISTOGRAM_CONFIGS[layer][hist_type]. Keys:bin_size_bp,rolling_window_bp,peak_kwargs,rolling_color,peak_color.
- smftools.analysis.plot.histograms.gaussian_fit_plot(values, output_path, title='', xlabel='Center-to-center distance (bp)', color='#1f77b4', hist_config=None, fit_config=None, dpi=300, figsize=(3.5, 2.5))#
Histogram with least-squares Gaussian fit overlay.
fit_config fields: fit_range_bp (tuple[float,float]), fit_color (str).
- Return type: