You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling FancyArrowPatch with the path parameter (instead of posA & posB), the shrink* parameters are not interpreted as defined in the docs:
Alternatively if path is provided, an arrow is drawn along this path and patchA, patchB, shrinkA, and shrinkB are ignored.
However, I can't figure out how to reproduce shrink*'s behavior.
Could anyone provide a solution, please?
Context
I'm writing a PR to improve NetworkX's drawing capabilities, see #4743. For the first time ever, NetworkX would need to draw non-straight edges (composed of straight segments).
Wanting to modify the draw_networkx_edges function as little as possible, I wanted to use FancyArrowPatch as they already do. But I fail to produce an acceptable output because of these arrow heads getting under their target vertex.
Using inside_circle and split_path_inout as done in ConnectionStyle's _shrink method fails with ValueError('The path does not intersect with the patch')
I guess computing the path's last position in order to avoid overlap between the arrowhead and the vertex would not be so hard, but I feel like it would burden NetworkX with a brittle solution. I'll do this in last resort.
Modifying Matplotlib certainly is a poor solution. Besides, I read you too had difficulties navigating this part of the codebase.
If some of you peoples have a simple solution to provide, it'd be a pleasure. Thanks :)
PS: Be sure I will add my example to Matplotlib's gallery! Usage of FancyArrowPatch with the path parameter is simply missing right now.
The text was updated successfully, but these errors were encountered:
The assumption appears to be that if you are specifying the path you are capable of adding the "shrink" yourself. It is pretty hard to algorithmically shrink along an arbitrary user-supplied path.
Since this is working as documented, please discuss at discourse.matplotlib.org. Thanks for your understanding!
Describe the issue
When calling
FancyArrowPatch
with thepath
parameter (instead ofposA
&posB
), theshrink*
parameters are not interpreted as defined in the docs:However, I can't figure out how to reproduce
shrink*
's behavior.Could anyone provide a solution, please?
Context
I'm writing a PR to improve NetworkX's drawing capabilities, see #4743. For the first time ever, NetworkX would need to draw non-straight edges (composed of straight segments).
Wanting to modify the
draw_networkx_edges
function as little as possible, I wanted to useFancyArrowPatch
as they already do. But I fail to produce an acceptable output because of these arrow heads getting under their target vertex.Minimal non-working example
Pathways
inside_circle
andsplit_path_inout
as done inConnectionStyle
's_shrink
method fails withValueError('The path does not intersect with the patch')
If some of you peoples have a simple solution to provide, it'd be a pleasure. Thanks :)
PS: Be sure I will add my example to Matplotlib's gallery! Usage of FancyArrowPatch with the
path
parameter is simply missing right now.The text was updated successfully, but these errors were encountered: