Right now, tanglegram supports assigning any desired colors to the connectors of two dendrograms by simply making a sufficient-length vector. This allows for some super interesting graphics to highlight differences in the tree like this
I wonder if it's possible to do the same with the connector edge weights as well, to even further highlight interesting connections (lwd parameter)?
After poking around in the tanglegram.dendrogram function, it seems like for colors, you check to see if the argument supplied is a single color, in which case you repeat it as many times as needed, or you treat the list of colors as a vector and index through it as you draw your arrows.
Hi Tal,
Right now, tanglegram supports assigning any desired colors to the connectors of two dendrograms by simply making a sufficient-length vector. This allows for some super interesting graphics to highlight differences in the tree like this
I wonder if it's possible to do the same with the connector edge weights as well, to even further highlight interesting connections (lwd parameter)?
After poking around in the tanglegram.dendrogram function, it seems like for colors, you check to see if the argument supplied is a single color, in which case you repeat it as many times as needed, or you treat the list of colors as a vector and index through it as you draw your arrows.
https://github.com/talgalili/dendextend/blob/master/R/tanglegram.R#L897 https://github.com/talgalili/dendextend/blob/master/R/tanglegram.R#L906
I'm sure something similar could be done with lwd, right?
Perhaps if I have some time I can look through and try to implement this.