plot_utils.py
plot_utils.py gathers the package’s visualization tools. It hosts histogram and a small group of private helpers shared with fit_utils for validation, style management, and consistent behaviour in notebooks.
Main imports
Standard library:
contextlib.contextmanager,importlib.resources.as_file,importlib.resources.files,typing.TYPE_CHECKINGExternal libraries:
numpy as np,numpy.typing.ArrayLikeInternal imports:
_as_float_vector,standard_deviationTypes imported only for annotations:
matplotlib.axes.Axes,matplotlib.figure.Figure
What it exports
What it does
validate numeric inputs, axis limits,
figsize, and textual precisiontemporarily apply the
mespystyle, the currentrcParams, or another Matplotlib stylemanage the display of figures created inside IPython/Jupyter notebooks
create a new figure or draw on an existing axis
optionally show the mean, a one-sigma band, legend, and grid