OneZoom / OZtree

OneZoom Tree of Life Explorer
Other
88 stars 20 forks source link

Color gradient on tree fill to signify zoom grade #409

Open mavaddat opened 3 years ago

mavaddat commented 3 years ago

It is difficult for the user (the person viewing the OneZoom tree) to visually intuit how zoomed-in they are on the phylogenetic tree when the tree has a single gradient color fill and a fractal shape (every child node has the same shape outline as its parent). Here is an example of a graduated tree in real life:

Rising Sun Redbud Cercis canadensis is a deciduous tree with apricot to yellow and green heart-shaped leaves. It grows 12-15 feet tall and makes a great specimen plant for a small landscape.

It would be cool if the higher parental nodes on OneZoom had a deeper color than the subsequent child nodes. A color gradient of darker to lighter green might make sense.

colour gradient of green

hyanwong commented 3 years ago

Hi @mavaddat - that's a nice idea. One problem is that there are vastly different levels of zooming in different areas of the tree. For instance, in the insects, https://www.onezoom.org/life/@Eilema_lutarellum=14098 is nested many hundreds of nodes deep, versus only 42 or so for humans.

Perhaps the best way to implement something like this would therefore be to colour branches by the age of their associated node. Unfortunately, not all the nodes in the current tree have ages.

mavaddat commented 3 years ago

Besides age-based colour gradations, another possibility is to make a variable-width gradient scaled by the maximum depth of the tree. So, if the longest branch has 42 levels, then there would be 42 gradations between the root (all life) and any given leaf (a specific species in an ecotype, i.e., a node without children). This would mean that the pixel-width of the gradation would not be uniform, but would be calculated at the level of each branch.

I will try to attached a diagram of what I mean…

hyanwong commented 3 years ago

The problem is that a single node could have one descendant lineage that goes down to (say) 200 levels, and another that only goes down to (say) 2 levels. I.e. the "maximum depth" in terms of levels is very different for different lineages.