Closed sciabolazza closed 5 years ago
Dear @sciabolazza
Thanks for reporting this, and all apologies for not answering your issue earlier.
Unfortunately, I cannot easily solve that issue, and thus prefer referring to the ggraph
package, which might well be able to do what you need. ggnetwork
is simply not powerful/flexible enough for 'following' the edge curvature with your edge labels.
I am using the r package ggnetwork to plot a weighted directed graph.
My goal is to plot a label indicating the weight of each edge. Since the network is directed, I use the field curvature in the function geom_edges() to avoid overlapping edges. Then, I use the function geom_edgetext() to plot the weight of each edge.
My problem is that I do not know how to provide the new coordinates of the edges (after the curvature has been set) to geom_edgetext().
As a result, labels are positioned as if edges weren't curved. Any idea?
Following a reproducible example showing where I got so far: