-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Bug report
Bug summary
The code from https://sourceforge.net/p/matplotlib/mailman/attachment/CAG%3DuJ%2Bnw2dE05P9TOXTz_zp-mGP3cY801vMH7yt6vgP9_WzU8w%40mail.gmail.com/1/ works with version 1.5.3, i.e. a dashed
arrow can be drawn with a solid
arrowhead using matplotlib.patheffects.Stroke
. This no longer works with version 2.0.2. I haven't tried version 2.1.0
Code for reproduction
For the code to run replace
class ConditionalStroke(pe._Base):
with
class ConditionalStroke(pe.RendererBase):
Actual outcome
With matplotlib-2.0.2
the code does not fail but the arrowhead portion of the arrow is drawn with the dashed
linestyle. With matplotlib-1.5.3
if I replace pe.Stroke(linestyle="solid")
in the code with pe.Stroke(linestyle="junk")
I get
valueError: Unrecognized linestyle: junk
However, with the same replacement and running the code with matplotlib-2.0.2
there is no valueError
and the arrow and arrowhead are drawn with the dashed
linestyle.
Expected outcome
The desired result is to have an arrow with a dashed
linestyle but with a solid
arrowhead. It appears that matplotlib.patheffects.Stoke
in version 2.0.2 is aware of the linestyle
parameter but does not do anything with it. Pehaps with the newer matplotlib the intent is to not allow the linestyle
to be changed via patheffects
? If so, then perhaps an error should be thrown when the linestyle
parameter in used. This is a feature that has been used in Sage
(https://trac.sagemath.org/ticket/23696).
Matplotlib version
- Operating system: Gentoo
- Matplotlib version: 1.5.3 & 2.0.2
- Matplotlib backend (
print(matplotlib.get_backend())
): Qt4Agg & TkAgg - Python version: 2.7.12
- Jupyter version (if applicable):
- Other libraries:
Matplotlib was installed from source.