matplotview.view

matplotview.view(axes: Axes, axes_to_view: Axes, image_interpolation: str = 'nearest', render_depth: int | None = None, filter_set: Iterable[Type[Artist] | Artist] | None = None, scale_lines: bool = True) Axes[source]

Convert an axes into a view of another axes, displaying the contents of the second axes. If this axes is already viewing the passed axes (This function is called twice with the same axes arguments) this function will update the settings of the viewing instead of creating a new view.

Parameters:
axes: Axes

The axes to turn into a view of another axes.

axes_to_view: Axes

The axes to display the contents of in the first axes, the ‘viewed’ axes.

image_interpolation: string, default of ‘nearest’

The image interpolation method to use when displaying scaled images from the axes being viewed. Defaults to ‘nearest’. Supported options are ‘antialiased’, ‘none’, ‘nearest’, ‘bilinear’, ‘bicubic’, ‘spline16’, ‘spline36’, ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, ‘quadric’, ‘catrom’, ‘gaussian’, ‘bessel’, ‘mitchell’, ‘sinc’, ‘lanczos’, or ‘blackman’.

render_depth: optional int, positive, defaults to None

The number of recursive draws allowed for this view, this can happen if the view is a child of the axes (such as an inset axes) or if two views point at each other. If None, uses the default render depth of 5, unless the axes passed is already a view axes, in which case the render depth the view already has will be used.

filter_set: Iterable[Union[Type[Artist], Artist]] or None

An optional filter set, which can be used to select what artists are drawn by the view. Any artists or artist types in the set are not drawn.

scale_lines: bool, defaults to True

Specifies if lines should be drawn thicker based on scaling in the view.

Returns:
axes

The modified ~.axes.Axes instance which is now a view. The modification occurs in-place.

See also

matplotview.stop_viewing

Delete or stop an already constructed view.

matplotview.inset_zoom_axes

Convenience method for creating inset axes that are views of the parent axes.