[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/stable/api/_as_gen/matplotlib.artist.Artist.set_clip_path.html [Back]  [Original]

matplotlib.artist.Artist.set_clip_path — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

matplotlib.artist.Artist.set_clip_path#

Artist.set_clip_path(path, transform=None)[source]#

Set the artist's clip path.

Parameters:
pathPatch or Path or TransformedPath or None

The clip path. If given a Path, transform must be provided as well. If None, a previously set clip path is removed.

transformTransform, optional

Only used if path is a Path, in which case the given Path is converted to a TransformedPath using transform.

Notes

For efficiency, if path is a Rectangle this method will set the clipping box to the corresponding rectangle and set the clipping path to None.

For technical reasons (support of set), a tuple (path, transform) is also accepted as a single positional parameter.

Examples using matplotlib.artist.Artist.set_clip_path#

[]

Many ways to plot images

Many ways to plot images
[]

Clipping images with patches

Clipping images with patches
[]

Dolphins

Dolphins
[]

Looking glass

Looking glass

Web Proxy Viewer  |  New URL  |  Original Page