ProductSpaceElement.show

ProductSpaceElement.show(self, title=None, indices=None, \*\*kwargs)[source]

Display the parts of this product space element graphically.

Parameters
titlestring, optional

Title of the figures

indicesint, slice, tuple or list, optional

Display parts of self in the way described in the following.

A single list of integers selects the corresponding parts of this vector.

For other tuples or lists, the first entry indexes the parts of this vector, and the remaining entries (if any) are used to slice into the parts. Handling those remaining indices is up to the show methods of the parts to be displayed.

The types of the first entry trigger the following behaviors:

  • int: take the part corresponding to this index

  • slice: take a subset of the parts

  • None: equivalent to slice(None), i.e., everything

Typical use cases are displaying of selected parts, which can be achieved with a list, e.g., indices=[0, 2] for parts 0 and 2, and plotting of all parts sliced in a certain way, e.g., indices=[None, 20, None] for showing all parts sliced with indices [20, None].

A single int, slice, list or None object indexes the parts only, i.e., is treated roughly as (indices, Ellipsis). In particular, for None, all parts are shown with default slicing.

in_figssequence of matplotlib.figure.Figure, optional

Update these figures instead of creating new ones. Typically the return value of an earlier call to show is used for this parameter.

kwargs

Additional arguments passed on to the show methods of the parts.

Returns
figstuple of matplotlib.figure.Figure

The resulting figures. In an interactive shell, they are automatically displayed.

See also

odl.discr.discr_space.DiscretizedSpaceElement.show

Display of a discretized function

odl.space.base_tensors.Tensor.show

Display of sequence type data

odl.util.graphics.show_discrete_data

Underlying implementation