xbitinfo.graphics.plot_distribution(ds, nbins=1000, cmap='viridis', offset=0.01, close_zero=0.01)[source]#

Plot statistical distributions of all variables as in Klöwer et al. 2021 Figure SI 1. For large data subsetting, i.e. ds = ds.isel(x=slice(None, None, 100)) is recommended.

Klöwer, M., Razinger, M., Dominguez, J. J., Düben, P. D., & Palmer, T. N. (2021). Compressing atmospheric data into its real information content. Nature Computational Science, 1(11), 713–724. doi: 10/gnm4jj

  • bitinfo (xarray.Dataset) – Raw input values for distributions

  • nbints (int) – Number of bins for histograms across all variable range. Defaults to 1000.

  • cmap (str) – Which matplotlib colormap to use. Defaults to "viridis".

  • offset (float) – Offset on the yaxis between variables 0 lines. Defaults to 0.01.

  • close_zero (float) – Threshold where to stop close to 0, when distributions ranges from negative to positive. Increase this value when seeing an unexpected dip around 0 in the distribution. Defaults to 0.01.


fig (matplotlib figure)


>>> ds = xr.tutorial.load_dataset("eraint_uvz")
>>> xb.plot_distribution(ds)
<Axes: title={'center': 'Statistical distributions'}, xlabel='value', ylabel='Probability density'>