smps.plots.heatmap#
- smps.plots.heatmap(X, Y, Z, ax=None, logy=True, cbar=True, hide_low=True, cmap='viridis', fig_kws={}, cbar_kws={}, plot_kws={}, **kwargs)#
Plot the size distribution over time (i.e., banana plot).
- Parameters
- Xarray-like
An array of times or datetime objects to plot on the x-axis.
- Yarray-like
An array of particle diameters to plot on the y-axis.
- Z2D array-like
A 2D-array of particle concentrations to plot on the Z axis.
- axmatplotlib.axis.Axis
An axis object to plot on. If none is provided, one will be created.
- logybool, default=True
If true, the y-axis will be semilogy.
- cbarbool, default=True
If true, a colorbar will be added.
- hide_lowbool, default=True
If true, low values will be masked.
- cmapmatplotlib.colormap, default=’viridis’
The colormap to use. Can be anything other that ‘jet’.
- fig_kwsdict, default=None
Optional kwargs to pass to the Figure.
- cbar_kwsdict, default=None
Optional kwargs to be passed to the colorbar.
- plot_kwsdict, default=None
Optional kwargs to be passed to pcolormesh.
- cbar_minfloat
The minimum value to use for the colorbar. Defaults to the greater of 1 or the lowest Z value.
- cbar_maxfloat
The maximum value to use for the colobar. Defaults to the largest value in Z.
- Returns
- axmatplotlib.axis.Axis
Examples
Plot a banana:
>>> ax = smps.plots.heatmap(X, Y, Z, cmap='viridis')