8000 Merge pull request #22511 from oscargus/patchpatching · matplotlib/matplotlib@73db9bf · GitHub
[go: up one dir, main page]

Skip to content

Commit 73db9bf

Browse files
authored
Merge pull request #22511 from oscargus/patchpatching
Remove redundant rcParam-lookup in patches
2 parents 7b2d828 + 3d0ff67 commit 73db9bf

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
## Patches are graphical objects that fill 2D space, like polygons or circles.
147147
## See https://matplotlib.org/api/artist_api.html#module-matplotlib.patches
148148
## for more information on patch properties.
149-
#patch.linewidth: 1 # edge width in points.
149+
#patch.linewidth: 1.0 # edge width in points.
150150
#patch.facecolor: C0
151151
#patch.edgecolor: black # if forced, or patch is not filled
152152
#patch.force_edgecolor: False # True to always use edgecolor

lib/matplotlib/patches.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,12 @@ def __init__(self,
6363
"""
6464
super().__init__()
6565

66-
if linewidth is None:
67-
linewidth = mpl.rcParams['patch.linewidth']
6866
if linestyle is None:
6967
linestyle = "solid"
7068
if capstyle is None:
7169
capstyle = CapStyle.butt
7270
if joinstyle is None:
7371
joinstyle = JoinStyle.miter
74-
if antialiased is None:
75-
antialiased = mpl.rcParams['patch.antialiased']
7672

7773
self._hatch_color = colors.to_rgba(mpl.rcParams['hatch.color'])
7874
self._fill = True # needed for set_facecolor call
@@ -393,8 +389,6 @@ def set_linewidth(self, w):
393389
"""
394390
if w is None:
395391
w = mpl.rcParams['patch.linewidth']
396-
if w is None:
397-
w = mpl.rcParams['axes.linewidth']
398392
self._linewidth = float(w)
399393
self._dash_pattern = mlines._scale_dashes(
400394
*self._unscaled_dash_pattern, w)

0 commit comments

Comments
 (0)
0