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
Would it be possible to avoid segments intersecting other labels as in this example:
It seems you are using a force directed layout, which IIRC does not really concern itself with the segments but only the nodes. One solution might be to ramp up the force when intersections are detected?
Detecting intersections for all labels may be just way too computationally expensive, so feel free to close issue if not feasible! (Thanks for fantastic package!)
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue and including a figure that shows the problem.
Indeed, the algorithm is using repulsive forces to push labels away from each other, and to push labels away from the labeled points. I might suggest using one of the existing functions in my code to compute the intersection between a rectangle and a line, and then repelling the rectangle away from this intersection point. There may be some unexpected consequences, but I think it's worth a try.
I would be very happy to review a pull request that implements this feature. If you decide to do it, please include test cases that show off the new behavior.
@erikor Could I please ask you to try the latest ggrepel 0.7.1 and let me know if it works better for cases where line segments are intersecting? @AliciaSchep implemented some new code and I have a feeling you might like the new behavior.
Would it be possible to avoid segments intersecting other labels as in this example:
It seems you are using a force directed layout, which IIRC does not really concern itself with the segments but only the nodes. One solution might be to ramp up the force when intersections are detected?
Detecting intersections for all labels may be just way too computationally expensive, so feel free to close issue if not feasible! (Thanks for fantastic package!)
The text was updated successfully, but these errors were encountered: