smps.plots.histplot#

smps.plots.histplot(histogram, bins, ax=None, plot_kws=None, fig_kws=None, **kwargs)#

Plot the particle size distribution at a single point in time.

Parameters
histogramarray-like or DataFrame

The array of number, surface area, or volume concentrations to plot on the y-axis. If a dataframe is provided, it will plot the average.

binsarray-like

A 3xn array of bins to use to plot the x axis.

axmatplotlib.axis.Axis, default=None

An existing matplotlib axis object. If none is provided, one will be created (and returned).

plot_kwsdict, default=None

Optional kwargs passed to the matplotlib.pyplot.bar object. See here for more info.

fig_kwsdict, default=None

Optional kwargs passed to the matplotlib.figure.figure object. See here for more info.

Returns
axmatplotlib.axis.Axis

Examples

Create a simple plot for a number-weighted distribution:

>>> ax = smps.plots.histplot(obj.dndlogdp, obj.bins)