-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuestopic: arrow
Description
Bug report
The linestyle of the arrowhead seems not correct in matplotlib 3.1.3 when using dashed lines. Is there something that can be done to workaround or fix this?
Code for reproduction
from matplotlib import pyplot as plt
fig, ax = plt.subplots(figsize=(3,2))
ax.plot([-0.5, 0], [183, 184], linestyle='--', linewidth=1.0)
ax.annotate("", (-0.22,184), xytext=(-0.175,184.1),
arrowprops=dict(arrowstyle="->", color='black', linestyle='--', linewidth=1.0,),
)
ax.set_xlim((-0.25, -0.15))
ax.set_ylim((180, 185))
which shows the dashed lines in the arrow head/tip which looks like the arrow is broken and changes depending on its length and position:
(I don't know why the linestyles regarding spacing are different, but this is probably just a rc parameter setting.)
Matplotlib version
- Operating system: Windows 10
- Matplotlib version: 3.1.3
- Matplotlib backend: all
Related
This looks a little bit like #9579 but I don't know if the same codepath is relevant here.
samuela and kc9jud
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuestopic: arrow