You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1774+g324a8afd3
Fork me on GitHub


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

Set the artist's clip path, which may be:

  • a Patch (or subclass) instance; or
  • a Path instance, in which case a Transform instance, which will be applied to the path before using it for clipping, must be provided; or
  • None, to remove a previously set clipping path.

For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to None.

ACCEPTS: [(Path, Transform) | Patch | None]