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

Skip to content

Commit 5bb29e0

Browse files
committed
Fix fancy arrows
1 parent de7bc93 commit 5bb29e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/pylab_examples/fancyarrow_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def to_texstring(s):
2525
for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
2626
x = 3.2 + (i//nrow)*4
2727
y = (figheight - 0.7 - i % nrow) # /figheight
28-
p = mpatches.Circle((x, y), 0.2, fc="w")
28+
p = mpatches.Circle((x, y), 0.2)
2929
ax.add_patch(p)
3030

3131
ax.annotate(to_texstring(stylename), (x, y),
@@ -37,7 +37,7 @@ def to_texstring(s):
3737
patchB=p,
3838
shrinkA=5,
3939
shrinkB=5,
40-
fc="w", ec="k",
40+
fc="k", ec="k",
4141
connectionstyle="arc3,rad=-0.05",
4242
),
4343
bbox=dict(boxstyle="square", fc="w"))

lib/matplotlib/patches.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,8 @@ class FancyArrow(Polygon):
11341134
Like Arrow, but lets you set head width and head height independently.
11351135
"""
11361136

1137+
_edge_default = True
1138+
11371139
def __str__(self):
11381140
return "FancyArrow()"
11391141

@@ -2465,6 +2467,7 @@ def __init__(self, xy, width, height,
24652467

24662468
self._mutation_scale = mutation_scale
24672469
self._mutation_aspect = mutation_aspect
2470+
24682471
self.stale = True
24692472

24702473
@docstring.dedent_interpd
@@ -3951,6 +3954,7 @@ class FancyArrowPatch(Patch):
39513954
"""
39523955
A fancy arrow patch. It draws an arrow using the :class:ArrowStyle.
39533956
"""
3957+
_edge_default = True
39543958

39553959
def __str__(self):
39563960

0 commit comments

Comments
 (0)