Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Arrow tip erroneously includes dashes #17284

Open
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues topic: arrow
@asteppke

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:

image

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues topic: arrow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /