6. Diagnostics

This module contains diagnostic output functions for the sed module

sed.diagnostics.plot_single_hist(histvals, edges, legend=None, **kwds)

Bokeh-based plotting of a single histogram with legend and tooltips.

Parameters:
  • histvals (np.ndarray) – Histogram counts (e.g. vertical axis).

  • edges (np.ndarray) – Histogram edge values (e.g. horizontal axis).

  • legend (str, optional) – Text for the plot legend. Defaults to None.

  • **kwds – Keyword arguments for bokeh.plotting.figure().quad().

Returns:

An instance of ‘bokeh.plotting.Figure’ as a plot handle.

Return type:

pbk.Figure

sed.diagnostics.grid_histogram(dct, ncol, rvs, rvbins, rvranges, backend='bokeh', legend=True, histkwds=None, legkwds=None, **kwds)

Grid plot of multiple 1D histograms.

Parameters:
  • dct (dict) – Dictionary containing the name and values of the random variables.

  • ncol (int) – Number of columns in the plot grid.

  • rvs (Sequence) – List of names for the random variables (rvs).

  • rvbins (Sequence) – Bin values for all random variables.

  • rvranges (Sequence[Tuple[float, float]]) – Value ranges of all random variables.

  • backend (str, optional) – Backend for making the plot (‘matplotlib’ or ‘bokeh’). Defaults to “bokeh”.

  • legend (bool, optional) – Option to include a legend in each histogram plot. Defaults to True.

  • histkwds (dict, optional) – Keyword arguments for histogram plots. Defaults to None.

  • legkwds (dict, optional) – Keyword arguments for legends. Defaults to None.

  • **kwds – Additional keyword arguments.