arviz_plots.PlotMatrix#
- class arviz_plots.PlotMatrix(data, facet_dims, aes=None, backend=None, figure_kwargs=None, **kwargs)[source]#
Low level base class for pairwise matrix arranges of plots.
- Attributes:
vizxarray.DataTreeInformation about the visual elements in the plot as a DataTree.
aesxarray.DataTreeInformation about aesthetic mapping as a DataTree.
See also
arviz_plots.PlotCollectionUnidimensional facetting manager
- __init__(data, facet_dims, aes=None, backend=None, figure_kwargs=None, **kwargs)[source]#
Initialize a PlotMatrix.
- Parameters:
- data
xarray.Dataset Data for which to generate the requested matrix layout of plots.
- facet_dims
listof hashable List of dimensions to use for facetting. It also support the
__variable__indicator to facet across variables.- aesmapping of {
strlistof hashable}, optional Dictionary with aesthetics as keys and as values a list of the dimensions it should be mapped to. See
generate_aes_dtfor more details.- backend
str, optional Plotting backend. It will be stored and passed down to the plotting functions when using methods like
map.- **kwargsmapping, optional
Dictionary with aesthetics as keys and as values a list of the values that should be taken by that aesthetic.
- data
Methods
__init__(data, facet_dims[, aes, backend, ...])Initialize a PlotMatrix.
add_legend(dim[, aes, artist_kwargs, title, ...])Add a legend for the given visual/aesthetic to the plot.
allocate_artist(fun_label, data, all_loop_dims)Allocate an visual in the
vizDataTree.generate_aes_dt(aes[, data])Generate the aesthetic mappings.
get_aes_as_dataset(aes_key)Get the values of the provided aes_key for all variables as a Dataset.
get_aes_kwargs(aes, var_name, selection)Get the aesthetic mappings for the given variable and selection as a dictionary.
get_target(var_name, selection[, ...])Get the target that corresponds to the given variable and selection.
get_viz(artist_name[, var_name, sel])Get element from
.vizthat corresponds to the provided subset.grid(data[, cols, rows, backend, figure_kwargs])Instatiate a PlotCollection and generate a plot grid iterating over rows and columns.
map(fun[, fun_label, data, coords, ...])Apply the given plotting function along the diagonal with the corresponding aesthetics.
map_col(fun[, fun_label, index, data, ...])Apply the given plotting function along the column with the corresponding aesthetics.
map_lower(*args, **kwargs)Call
map_trianglewithtriangle="lower".map_row(fun[, fun_label, index, data, ...])Apply the given plotting function along the row with the corresponding aesthetics.
map_triangle(fun[, fun_label, data, ...])Apply the given plotting function to all plots with the corresponding aesthetics.
map_upper(*args, **kwargs)Call
map_trianglewithtriangle="upper".rename_visuals([name_dict])Rename visual data variables in the
vizDataTree.savefig(filename, **kwargs)Call the backend function to save this figure.
set_fixed_var_attributes(index[, orientation])Set fixed variable attributes for the current orientation according to given index.
show()Call the backend function to show this figure.
store_in_artist_da(aux_artist, fun_label, ...)Store visual object or array into its preallocated DataArray within
viz.update_aes([ignore_aes, coords])Update list of aesthetics after indicating ignores and extra subsets.
update_aes_from_dataset(aes_key, dataset)Update the values of aes_key with those in the provided Dataset.
wrap(data[, cols, col_wrap, backend, ...])Instatiate a PlotCollection and generate a plot grid iterating over subsets and wrapping.
Attributes
Information about aesthetic mapping as a DataTree.
Return all aesthetics with a mapping defined as a set.
coordsInformation about slicing operation to always be applied on the PlotCollection.
Dataset to be used as data for plotting.
Facetting dimensions.
Information about the visual elements in the plot as a DataTree.