christophergandrud / networkD3

D3 JavaScript Network Graphs from R
http://christophergandrud.github.io/networkD3
649 stars 270 forks source link

set xpos per species #296

Open Estherrr1997 opened 1 year ago

Estherrr1997 commented 1 year ago

Hi,

I am using the SankeyNetwork function of D3Network.

I was wondering, does NetworkD3 has a function to set the xpos for a set of nodes? I am using a bigger dataset with 61 links; all from 6 different species. I would like to set an xpos for the 6 species and see the gene flow horizontally, one species per xpos.

Ideally it would look something like this: 0 Pgla_V1_ctg0001 xpos=1 1 elephantNW_024704744.1 xpos=2 2 elephantNW_024704774.1 xpos=2 3 ssNC_052151.1 xpos=3 4 ssNC_052146.1 xpos=3 5 whiteNW_024470908.1 xpos=4

Kind regards! Esther

cjyetman commented 1 year ago

No, the position of nodes in {networkD3} are determined algorithmically. The primary purpose of {networkD3} is to create an optimized layout of nodes.