When doing an image which puts lots of focus on some arrows, I noticed that the arrows didn\'t reach the full length between the specified points.
For example:
<
shrinkA=0
and shrinkB=0
This is the first main direct reason why arrows don't touch.
Those values default to 2
, presumably because arrows were originally mostly used in annotations where some space is desired.
If I set them to zero:
FancyArrowPatch(
shrinkA=0,
shrinkB=0,
then the arrows touch as shown at:
A is for the start, and B is for the end of the arrow.
The effect of linewidth
Another thing to keep in mind however is that the linewidth
can also affect if the arrow touches something or not.
For example, if I add an exaggerated linewidth=10
to the original code:
FancyArrowPatch(
shrinkA=0,
shrinkB=0,
linewidth=10,
then the result is:
so we note how:
Simple
and CurveFilledAB
have different drawing algorithms: the one for Simple
makes the arrow overrun the target, and CurveFilledAB
makes it under runFor the case of Simple
, if you don't need a different border color, you can get back the pointy arrow with linewidth=0
, and control the main arrow line width with tail_width
.
This does not work for CurveFilledAB
however: the drawing algorithm for that style is to use the border alone for the main arrow line, so I'm not sure how to separately control the main line width of a double headed arrow without getting the rounded corners, except for drawing two simple arrows which is uglier: matplotlib simple and two head arrows Seems like something that could be patched by adding a new SimpleAB
class.
The result of:
FancyArrowPatch(
shrinkA=0,
shrinkB=0,
linewidth=0,
is: