r - modified sankey Plot with several edges between nodes -


i make modified sankey plot in r, possible have several edges between nodes, identify different paths. bit hard explain made sample picture in ppt :)

enter image description here

i know ugly :) point able make edges between , b1, , indicate edge belongs path going c1 , c2.

i tried sankeyplot rcharts-packages, 2 columns of nodes.

i have tried riverplot-packages, here can not make 2 edges between same nodes.

you can use diagrammer graphviz graph , html table labels:

library(diagrammer)  g1 <-  'digraph structs {     b1_node [label=<       <table border="0" cellborder="1" cellspacing="0">         <tr><td port="one">b one</td></tr>         <tr><td port="two">b two</td></tr>       </table>       > ];      -> b1_node:one;     -> b1_node:two;     -> b2;     b1_node:one -> c1;     b1_node:two -> c2;     b2 -> c3;      rankdir=lr }'  grviz(g1) 

enter image description here

see diagrammer/graphviz , graphviz/node shapes documentation.

sankey version

you use sankey diagram have split node b1:

links <- data.frame(   source = c("a", "a", "b1",   "b1", "a",    "b1a", "b1b", "b2" ),   target =c("b1", "b1", "b1a", "b1b", "b2",  "c1", "c2", "c3"),   value = c(20, 20, 20, 20, 30, 20, 20, 30) ) 

enter image description here


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -