arviz_plots.PlotCollection.wrap

arviz_plots.PlotCollection.wrap#

classmethod PlotCollection.wrap(data, cols=None, col_wrap=4, backend=None, plot_grid_kws=None, **kwargs)[source]#

Instatiate a PlotCollection and generate a plot grid iterating over subsets and wrapping.

Parameters:
dataxarray.Dataset or dict of {str: xarray.Dataset}

If data is a dictionary, the Datasets stored as its values will be concatenated, creating a new dimension called model.

colsiterable of hashable, optional

Dimensions of the dataset for which different coordinate values should have different plots. A special dimension called __variable__ is also available, to indicate that each variable of the input Dataset should have their own plot; it can also be combined with other dimensions.

col_wrapint, default 4

Number of columns in the generated grid. If more than col_wrap plots are needed from facetting according to cols, new rows are created.

backendstr, optional

Plotting backend.

plot_grid_kwsmapping, optional

Passed to create_plotting_grid of the chosen plotting backend.

**kwargsmapping, optional

Passed as is to the initializer of PlotCollection. That is, used for aes and **kwargs arguments. See generate_aes_dt for more details about these arguments.