Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ef9fc20

Browse filesBrowse files
authored
Merge pull request #16850 from brunobeltran/miterlimit
use validate_[cap/join]style
2 parents 3fe3d1a + 5873b1d commit ef9fc20
Copy full SHA for ef9fc20

File tree

Expand file treeCollapse file tree

3 files changed

+8
-14
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-14
lines changed

‎lib/matplotlib/collections.py

Copy file name to clipboardExpand all lines: lib/matplotlib/collections.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def set_capstyle(self, cs):
599599
cs : {'butt', 'round', 'projecting'}
600600
The capstyle
601601
"""
602-
cbook._check_in_list(('butt', 'round', 'projecting'), capstyle=cs)
602+
mpl.rcsetup.validate_capstyle(cs)
603603
self._capstyle = cs
604604

605605
def get_capstyle(self):
@@ -614,7 +614,7 @@ def set_joinstyle(self, js):
614614
js : {'miter', 'round', 'bevel'}
615615
The joinstyle
616616
"""
617-
cbook._check_in_list(('miter', 'round', 'bevel'), joinstyle=js)
617+
mpl.rcsetup.validate_joinstyle(js)
618618
self._joinstyle = js
619619

620620
def get_joinstyle(self):

‎lib/matplotlib/lines.py

Copy file name to clipboardExpand all lines: lib/matplotlib/lines.py
+4-8Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,7 @@ def set_dash_joinstyle(self, s):
13521352
s : {'miter', 'round', 'bevel'}
13531353
For examples see :doc:`/gallery/lines_bars_and_markers/joinstyle`.
13541354
"""
1355-
s = mpl.rcsetup._deprecate_case_insensitive_join_cap(s)
1356-
cbook._check_in_list(self.validJoin, s=s)
1355+
mpl.rcsetup.validate_joinstyle(s)
13571356
if self._dashjoinstyle != s:
13581357
self.stale = True
13591358
self._dashjoinstyle = s
@@ -1367,8 +1366,7 @@ def set_solid_joinstyle(self, s):
13671366
s : {'miter', 'round', 'bevel'}
13681367
For examples see :doc:`/gallery/lines_bars_and_markers/joinstyle`.
13691368
"""
1370-
s = mpl.rcsetup._deprecate_case_insensitive_join_cap(s)
1371-
cbook._check_in_list(self.validJoin, s=s)
1369+
mpl.rcsetup.validate_joinstyle(s)
13721370
if self._solidjoinstyle != s:
13731371
self.stale = True
13741372
self._solidjoinstyle = s
@@ -1398,8 +1396,7 @@ def set_dash_capstyle(self, s):
13981396
s : {'butt', 'round', 'projecting'}
13991397
For examples see :doc:`/gallery/lines_bars_and_markers/joinstyle`.
14001398
"""
1401-
s = mpl.rcsetup._deprecate_case_insensitive_join_cap(s)
1402-
cbook._check_in_list(self.validCap, s=s)
1399+
mpl.rcsetup.validate_capstyle(s)
14031400
if self._dashcapstyle != s:
14041401
self.stale = True
14051402
self._dashcapstyle = s
@@ -1413,8 +1410,7 @@ def set_solid_capstyle(self, s):
14131410
s : {'butt', 'round', 'projecting'}
14141411
For examples see :doc:`/gallery/lines_bars_and_markers/joinstyle`.
14151412
"""
1416-
s = mpl.rcsetup._deprecate_case_insensitive_join_cap(s)
1417-
cbook._check_in_list(self.validCap, s=s)
1413+
mpl.rcsetup.validate_capstyle(s)
14181414
if self._solidcapstyle != s:
14191415
self.stale = True
14201416
self._solidcapstyle = s

‎lib/matplotlib/patches.py

Copy file name to clipboardExpand all lines: lib/matplotlib/patches.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ def set_capstyle(self, s):
461461
----------
462462
s : {'butt', 'round', 'projecting'}
463463
"""
464-
s = mpl.rcsetup._deprecate_case_insensitive_join_cap(s)
465-
cbook._check_in_list(self.validCap, capstyle=s)
464+
mpl.rcsetup.validate_capstyle(s)
466465
self._capstyle = s
467466
self.stale = True
468467

@@ -477,8 +476,7 @@ def set_joinstyle(self, s):
477476
----------
478477
s : {'miter', 'round', 'bevel'}
479478
"""
480-
s = mpl.rcsetup._deprecate_case_insensitive_join_cap(s)
481-
cbook._check_in_list(self.validJoin, joinstyle=s)
479+
mpl.rcsetup.validate_joinstyle(s)
482480
self._joinstyle = s
483481
self.stale = True
484482

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.