Skip to content

Commit 0266d90

Browse files
committed
Handle setting path_effects in the constructor using the setp infrastructure, so it doesn't have to be duplicated in each subclass. Modify a test to make sure this continues to work.
1 parent cdf7d0a commit 0266d90

File tree

6 files changed

+3
-10
lines changed

6 files changed

+3
-10
lines changed

examples/pylab_examples/patheffect_demo.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
txt = ax1.annotate("test", (1., 1.), (0., 0),
1010
arrowprops=dict(arrowstyle="->",
1111
connectionstyle="angle3", lw=2),
12-
size=20, ha="center")
13-
14-
txt.set_path_effects([PathEffects.withStroke(linewidth=3,
12+
size=20, ha="center", path_effects=[PathEffects.withStroke(linewidth=3,
1513
foreground="w")])
1614
txt.arrow_patch.set_path_effects([
1715
PathEffects.Stroke(linewidth=5, foreground="w"),

lib/matplotlib/collections.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def __init__(self,
9191
urls=None,
9292
offset_position='screen',
9393
zorder=1,
94-
path_effects=None,
9594
**kwargs
9695
):
9796
"""

lib/matplotlib/lines.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ def __init__(self, xdata, ydata,
149149
pickradius=5,
150150
drawstyle=None,
151151
markevery=None,
152-
path_effects = None,
153152
**kwargs
154153
):
155154
"""

lib/matplotlib/patches.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def __init__(self,
6464
antialiased=None,
6565
hatch=None,
6666
fill=True,
67-
path_effects=None,
6867
**kwargs):
6968
"""
7069
The following kwarg properties are supported

lib/matplotlib/tests/test_patheffects.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ def test_patheffect1():
1313
txt = ax1.annotate("test", (1., 1.), (0., 0),
1414
arrowprops=dict(arrowstyle="->",
1515
connectionstyle="angle3", lw=2),
16-
size=20, ha="center")
17-
18-
txt.set_path_effects([withStroke(linewidth=3,
16+
size=20, ha="center",
17+
path_effects=[withStroke(linewidth=3,
1918
foreground="w")])
2019
txt.arrow_patch.set_path_effects([Stroke(linewidth=5,
2120
foreground="w"),

lib/matplotlib/text.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ def __init__(self,
158158
rotation=None,
159159
linespacing=None,
160160
rotation_mode=None,
161-
path_effects=None,
162161
**kwargs
163162
):
164163
"""

0 commit comments

Comments
 (0)