briatte / ggnetwork

Geoms to plot networks with ggplot2
https://briatte.github.io/ggnetwork/
146 stars 28 forks source link

xend, yend not properly calculated with Kamada Kawai on tree structures #35

Open achmurzy opened 5 years ago

achmurzy commented 5 years ago

I have a graph with a tree structure. Only Kamada Kawai reveals the rooted structure, but something seems to be preventing the nodes from connecting. In essence, the xend and yend properties are not being properly computed. I'm not sure if this is an issue with how I'm parameterizing the layout algorithm or styling the elements; however, the node placement looks good and it should be trivial for the algorithm to properly place the endpoint for edges. It isn't though, see below. This happens whether or not I provide edge weights to the layout algorithm

image

achmurzy commented 5 years ago

Again, I'm not sure if this is an actual bug or if there's a configuration step I'm missing but I'm looking for some insight. Can provide data and code if needed

briatte commented 5 years ago

Hi @achmurzy

Thanks for reporting this, and sorry for answering earlier.

Yes, please do post your code. It seems like you are are trying to display arrows at the end of the edges, but those are not showing up.