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
The documentation suggests that geom_edge_*2 functions allow customisation of the control points:
The version postfixed with a "2" uses the "long" edge format (see get_edges()) and makes it possible to interpolate node parameter between the start and end node along the edge.
It wasted a bit too much of my time to understand that in fact it does not allow to specify the control points manually but barely computes them arbitrarily. The documentation is of course technically right - this is what interpolation means (kind of because technically bezier curve is an interpolation too), but this was quite surprising.
So currently get_edges() always returns 2 rows per edge, white StatEdgeArc2 and remove_loop2 assume that two rows are present, in particular by selecting every other row as from/to vertices and using them to compute the arcs:
If I wanted to have the full control I could switch to ggforce::geom_bezier2 but this means loosing out on all the goodies that GeomEdgePath provides. I wish I could just specify stat=ggforce::StatBezier2 but it seems unsupported in geom_edge_*2.
Any thoughts about this?
The text was updated successfully, but these errors were encountered:
yeah, you'd need a whole new edge geom for this. Arc was never intended as a general bezier geom for edges (in the same way that diagonal is a "fixed" bezier geom)
Such a geom would be quite niche so I'm afraid I can't prioritise that at the moment
The documentation suggests that
geom_edge_*2
functions allow customisation of the control points:It wasted a bit too much of my time to understand that in fact it does not allow to specify the control points manually but barely computes them arbitrarily. The documentation is of course technically right - this is what interpolation means (kind of because technically bezier curve is an interpolation too), but this was quite surprising.
So currently
get_edges()
always returns 2 rows per edge, whiteStatEdgeArc2
andremove_loop2
assume that two rows are present, in particular by selecting every other row as from/to vertices and using them to compute the arcs:ggraph/R/geom_edge_arc.R
Lines 176 to 178 in febab71
If I wanted to have the full control I could switch to
ggforce::geom_bezier2
but this means loosing out on all the goodies thatGeomEdgePath
provides. I wish I could just specifystat=ggforce::StatBezier2
but it seems unsupported ingeom_edge_*2
.Any thoughts about this?
The text was updated successfully, but these errors were encountered: