Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec8c739

Browse files
authored
Merge pull request #26700 from oscargus/clipboxtypechecking
Check type for set_clip_box
2 parents 01360ed + 414d382 commit ec8c739

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/artist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .colors import BoundaryNorm
1616
from .cm import ScalarMappable
1717
from .path import Path
18-
from .transforms import (Bbox, IdentityTransform, Transform, TransformedBbox,
18+
from .transforms import (BboxBase, Bbox, IdentityTransform, Transform, TransformedBbox,
1919
TransformedPatchPath, TransformedPath)
2020

2121
_log = logging.getLogger(__name__)
@@ -763,6 +763,7 @@ def set_clip_box(self, clipbox):
763763
clipping for an artist added to an Axes.
764764
765765
"""
766+
_api.check_isinstance((BboxBase, None), clipbox=clipbox)
766767
if clipbox != self.clipbox:
767768
self.clipbox = clipbox
768769
self.pchanged()

0 commit comments

Comments
 (0)