Skip to content

Commit e1cb909

Browse files
committed
Fix the doc of GraphicsContextBase.set_clip_rectangle.
The parameter is always a bbox, not a tuple, as shown by both all call sites and the changelog for mpl 0.98.0 (before which it was a tuple). Also shorten the doc for set_clip_path at the same time.
1 parent e079bd3 commit e1cb909

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -924,19 +924,11 @@ def set_capstyle(self, cs):
924924
self._capstyle = cs
925925

926926
def set_clip_rectangle(self, rectangle):
927-
"""
928-
Set the clip rectangle with sequence (left, bottom, width, height)
929-
"""
927+
"""Set the clip rectangle to a `.Bbox` or None."""
930928
self._cliprect = rectangle
931929

932930
def set_clip_path(self, path):
933-
"""
934-
Set the clip path and transformation.
935-
936-
Parameters
937-
----------
938-
path : `~matplotlib.transforms.TransformedPath` or None
939-
"""
931+
"""Set the clip path to a `.TransformedPath` or None."""
940932
cbook._check_isinstance((transforms.TransformedPath, None), path=path)
941933
self._clippath = path
942934

0 commit comments

Comments
 (0)