matplotlib.artist.Artist.set_clip_path#
- Artist.set_clip_path(path, transform=None)[source]#
Set the artist's clip path.
- Parameters:
- path
PatchorPathorTransformedPathor None The clip path. If given a
Path, transform must be provided as well. If None, a previously set clip path is removed.- transform
Transform, optional Only used if path is a
Path, in which case the givenPathis converted to aTransformedPathusing transform.
- path
Notes
For efficiency, if path is a
Rectanglethis method will set the clipping box to the corresponding rectangle and set the clipping path toNone.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#
Clipping images with patches
Image Demo
Dolphins
Looking Glass