You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.1.1.post1906+g5e3bede9d
Fork me on GitHub


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

Set the artist's clip path.

path : Patch 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.

transform : Transform, optional

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


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 setp), a tuple (path, transform) is also accepted as a single positional parameter.