arviz_plots.PlotMatrix.map_triangle

arviz_plots.PlotMatrix.map_triangle#

PlotMatrix.map_triangle(fun, fun_label=None, *, data=None, loop_data=None, triangle='both', coords=None, ignore_aes=frozenset({}), subset_info=False, store_artist=True, artist_dims=None, **kwargs)[source]#

Apply the given plotting function to all plots with the corresponding aesthetics.

Parameters:
funcallable

Function with signature fun(da_x, da_y, target, **fun_kwargs) which should be called for all couples of data pairs (each couple encoded in a plot) and corresponding aesthetic. The object returned by fun is assumed to be an scalar unless artist_dims are provided. There is also the option of adding extra keyword arguments with the subset_info flag.

fun_labelstr, optional

Function identifier. It will be used as variable name to store the object returned by fun. Defaults to fun.__name__.

dataxarray.Dataset, optional

Data to be subsetted into pair elements then loop to cover all couple combinations. Defaults to the data used to initalize the PlotMatrix.

loop_dataxarray.Dataset or str

TODO: see if it works and if we want to keep it.

coordsmapping, optional

Dictionary of {coordinate names : coordinate values} that should be used to subset the aes, data and viz objects before any faceting or aesthetics mapping is applied.

ignore_aesset, optional

Set of aesthetics present in aes that should be ignore for this map call.

subset_infobool, default False

Add the subset info from arviz_base.xarray_sel_iter for the da_x``+``da_y couple to the keyword arguments passed to fun. If true, then fun must accept the keyword arguments var_name_x, sel_x, isel_x, var_name_y, sel_y and isel_y. Moreover, if those were to be keys present in **kwargs their values in **kwargs would be ignored.

store_artistbool, default True
artist_dimsmapping of {hashableint}, optional

Dictionary of sizes for proper allocation and storage when using map with functions that return an array of visual.

**kwargs

Extra keyword arguments to be passed to fun.