Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ def _make_verts(self):
length = distance
else:
length = distance + head_length
if not length:
if np.size(length) == 0:
self.verts = np.empty([0, 2]) # display nothing if empty
else:
# start by drawing horizontal arrow, point at (0, 0)
Expand Down
6 changes: 6 additions & 0 deletions lib/matplotlib/tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,3 +999,9 @@ def test_set_and_get_hatch_linewidth(fig_test, fig_ref):

assert ax_ref.patches[0].get_hatch_linewidth() == lw
assert ax_test.patches[0].get_hatch_linewidth() == lw


def test_empty_fancyarrow():
fig, ax = plt.subplots()
arrow = ax.arrow([], [], [], [])
assert arrow is not None
Loading